feat: frontendのbuildに圧縮をかけるように(意味があるのかはわからない)

This commit is contained in:
mattyatea 2023-09-18 08:25:23 +09:00
parent 368afeba34
commit e970ddef2c
3 changed files with 15 additions and 2 deletions

View File

@ -130,6 +130,7 @@
"storybook": "7.4.1",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"summaly": "github:misskey-dev/summaly",
"vite-plugin-compression2": "^0.10.4",
"vite-plugin-turbosnap": "1.0.3",
"vitest": "0.34.4",
"vitest-fetch-mock": "0.2.2",

View File

@ -9,6 +9,7 @@ import locales from '../../locales';
import meta from '../../package.json';
import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-module-class-name';
import pluginJson5 from './vite.json5';
import compression from "vite-plugin-compression2";
const extensions = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.json', '.json5', '.svg', '.sass', '.scss', '.css', '.vue'];
@ -44,12 +45,12 @@ function toBase62(n: number): string {
export function getConfig(): UserConfig {
return {
base: '/vite/',
server: {
port: 5173,
},
plugins: [
compression(),
pluginVue({
reactivityTransform: true,
}),

View File

@ -980,6 +980,9 @@ importers:
summaly:
specifier: github:misskey-dev/summaly
version: github.com/misskey-dev/summaly/d2d8db49943ccb201c1b1b283e9d0a630519fac7
vite-plugin-compression2:
specifier: ^0.10.4
version: 0.10.4(rollup@3.29.1)
vite-plugin-turbosnap:
specifier: 1.0.3
version: 1.0.3
@ -19126,6 +19129,14 @@ packages:
- terser
dev: true
/vite-plugin-compression2@0.10.4(rollup@3.29.1):
resolution: {integrity: sha512-9YcESw0n1j8KxxY1NJKEcItlT0bLS+K/NKa/xPqZGEHW/qwgigIeRF/bCTUdZ/bn/mg2+PeERWgRmK8G1L0tyg==}
dependencies:
'@rollup/pluginutils': 5.0.4(rollup@3.29.1)
transitivePeerDependencies:
- rollup
dev: true
/vite-plugin-turbosnap@1.0.3:
resolution: {integrity: sha512-p4D8CFVhZS412SyQX125qxyzOgIFouwOcvjZWk6bQbNPR1wtaEzFT6jZxAjf1dejlGqa6fqHcuCvQea6EWUkUA==}
dev: true