Vite 8
This commit is contained in:
parent
7686c42748
commit
080686964a
4 changed files with 1237 additions and 91 deletions
|
|
@ -141,7 +141,7 @@ export const buildSwPlugin = ({ swSrc, swDest }) => {
|
||||||
name: 'sw_pleroma',
|
name: 'sw_pleroma',
|
||||||
},
|
},
|
||||||
emptyOutDir: false,
|
emptyOutDir: false,
|
||||||
rollupOptions: {
|
rolldownOptions: {
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: swDest,
|
entryFileNames: swDest,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
11
package.json
11
package.json
|
|
@ -65,8 +65,9 @@
|
||||||
"@biomejs/biome": "2.3.11",
|
"@biomejs/biome": "2.3.11",
|
||||||
"@pinia/testing": "1.0.3",
|
"@pinia/testing": "1.0.3",
|
||||||
"@ungap/event-target": "0.2.4",
|
"@ungap/event-target": "0.2.4",
|
||||||
"@vitejs/plugin-vue": "^5.2.1",
|
"@vitejs/devtools": "^0.3.1",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
"@vitejs/plugin-vue": "^6.0.7",
|
||||||
|
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
||||||
"@vitest/browser": "^3.0.7",
|
"@vitest/browser": "^3.0.7",
|
||||||
"@vitest/ui": "^3.0.7",
|
"@vitest/ui": "^3.0.7",
|
||||||
"@vue/babel-helper-vue-jsx-merge-props": "1.4.0",
|
"@vue/babel-helper-vue-jsx-merge-props": "1.4.0",
|
||||||
|
|
@ -113,9 +114,9 @@
|
||||||
"stylelint-config-recommended-scss": "^14.0.0",
|
"stylelint-config-recommended-scss": "^14.0.0",
|
||||||
"stylelint-config-recommended-vue": "^1.6.0",
|
"stylelint-config-recommended-vue": "^1.6.0",
|
||||||
"stylelint-config-standard": "38.0.0",
|
"stylelint-config-standard": "38.0.0",
|
||||||
"vite": "^6.1.0",
|
"vite": "^8.0.0",
|
||||||
"vite-plugin-eslint2": "^5.0.3",
|
"vite-plugin-eslint2": "^5.1.0",
|
||||||
"vite-plugin-stylelint": "^6.0.0",
|
"vite-plugin-stylelint": "^6.1.0",
|
||||||
"vitest": "^3.0.7",
|
"vitest": "^3.0.7",
|
||||||
"vue-eslint-parser": "10.2.0"
|
"vue-eslint-parser": "10.2.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
|
import { DevTools } from '@vitejs/devtools'
|
||||||
import eslint from 'vite-plugin-eslint2'
|
import eslint from 'vite-plugin-eslint2'
|
||||||
import stylelint from 'vite-plugin-stylelint'
|
import stylelint from 'vite-plugin-stylelint'
|
||||||
import { configDefaults } from 'vitest/config'
|
import { configDefaults } from 'vitest/config'
|
||||||
|
|
@ -135,6 +136,12 @@ export default defineConfig(async ({ mode, command }) => {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
vueJsx(),
|
vueJsx(),
|
||||||
|
DevTools({
|
||||||
|
build: {
|
||||||
|
withApp: true, // generate DevTools output during `vite build`
|
||||||
|
// outDir: 'custom-dir', // optional, defaults to Vite's build.outDir
|
||||||
|
},
|
||||||
|
}),
|
||||||
devSwPlugin({ swSrc, swDest, transformSW, alias }),
|
devSwPlugin({ swSrc, swDest, transformSW, alias }),
|
||||||
buildSwPlugin({ swSrc, swDest }),
|
buildSwPlugin({ swSrc, swDest }),
|
||||||
swMessagesPlugin(),
|
swMessagesPlugin(),
|
||||||
|
|
@ -197,12 +204,12 @@ export default defineConfig(async ({ mode, command }) => {
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
rollupOptions: {
|
rolldownOptions: {
|
||||||
|
devtools: {}, // enable devtools mode
|
||||||
input: {
|
input: {
|
||||||
main: 'index.html',
|
main: 'index.html',
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
inlineDynamicImports: false,
|
|
||||||
entryFileNames(chunkInfo) {
|
entryFileNames(chunkInfo) {
|
||||||
const id = chunkInfo.facadeModuleId
|
const id = chunkInfo.facadeModuleId
|
||||||
if (id.endsWith(swSrc)) {
|
if (id.endsWith(swSrc)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue