feat: frontendのbuildに圧縮をかけるように(意味があるのかはわからない)
This commit is contained in:
parent
368afeba34
commit
e970ddef2c
|
@ -130,6 +130,7 @@
|
||||||
"storybook": "7.4.1",
|
"storybook": "7.4.1",
|
||||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||||
"summaly": "github:misskey-dev/summaly",
|
"summaly": "github:misskey-dev/summaly",
|
||||||
|
"vite-plugin-compression2": "^0.10.4",
|
||||||
"vite-plugin-turbosnap": "1.0.3",
|
"vite-plugin-turbosnap": "1.0.3",
|
||||||
"vitest": "0.34.4",
|
"vitest": "0.34.4",
|
||||||
"vitest-fetch-mock": "0.2.2",
|
"vitest-fetch-mock": "0.2.2",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import pluginReplace from '@rollup/plugin-replace';
|
import pluginReplace from '@rollup/plugin-replace';
|
||||||
import pluginVue from '@vitejs/plugin-vue';
|
import pluginVue from '@vitejs/plugin-vue';
|
||||||
import { type UserConfig, defineConfig } from 'vite';
|
import {type UserConfig, defineConfig} from 'vite';
|
||||||
// @ts-expect-error https://github.com/sxzz/unplugin-vue-macros/issues/257#issuecomment-1410752890
|
// @ts-expect-error https://github.com/sxzz/unplugin-vue-macros/issues/257#issuecomment-1410752890
|
||||||
import ReactivityTransform from '@vue-macros/reactivity-transform/vite';
|
import ReactivityTransform from '@vue-macros/reactivity-transform/vite';
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import locales from '../../locales';
|
||||||
import meta from '../../package.json';
|
import meta from '../../package.json';
|
||||||
import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-module-class-name';
|
import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-module-class-name';
|
||||||
import pluginJson5 from './vite.json5';
|
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'];
|
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 {
|
export function getConfig(): UserConfig {
|
||||||
return {
|
return {
|
||||||
base: '/vite/',
|
base: '/vite/',
|
||||||
|
|
||||||
server: {
|
server: {
|
||||||
port: 5173,
|
port: 5173,
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
|
compression(),
|
||||||
pluginVue({
|
pluginVue({
|
||||||
reactivityTransform: true,
|
reactivityTransform: true,
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -980,6 +980,9 @@ importers:
|
||||||
summaly:
|
summaly:
|
||||||
specifier: github:misskey-dev/summaly
|
specifier: github:misskey-dev/summaly
|
||||||
version: github.com/misskey-dev/summaly/d2d8db49943ccb201c1b1b283e9d0a630519fac7
|
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:
|
vite-plugin-turbosnap:
|
||||||
specifier: 1.0.3
|
specifier: 1.0.3
|
||||||
version: 1.0.3
|
version: 1.0.3
|
||||||
|
@ -19126,6 +19129,14 @@ packages:
|
||||||
- terser
|
- terser
|
||||||
dev: true
|
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:
|
/vite-plugin-turbosnap@1.0.3:
|
||||||
resolution: {integrity: sha512-p4D8CFVhZS412SyQX125qxyzOgIFouwOcvjZWk6bQbNPR1wtaEzFT6jZxAjf1dejlGqa6fqHcuCvQea6EWUkUA==}
|
resolution: {integrity: sha512-p4D8CFVhZS412SyQX125qxyzOgIFouwOcvjZWk6bQbNPR1wtaEzFT6jZxAjf1dejlGqa6fqHcuCvQea6EWUkUA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
Loading…
Reference in a new issue