This commit is contained in:
Henry Jameson 2026-06-02 19:39:44 +03:00
commit 080686964a
4 changed files with 1237 additions and 91 deletions

View file

@ -141,7 +141,7 @@ export const buildSwPlugin = ({ swSrc, swDest }) => {
name: 'sw_pleroma',
},
emptyOutDir: false,
rollupOptions: {
rolldownOptions: {
output: {
entryFileNames: swDest,
},

View file

@ -65,8 +65,9 @@
"@biomejs/biome": "2.3.11",
"@pinia/testing": "1.0.3",
"@ungap/event-target": "0.2.4",
"@vitejs/plugin-vue": "^5.2.1",
"@vitejs/plugin-vue-jsx": "^4.1.1",
"@vitejs/devtools": "^0.3.1",
"@vitejs/plugin-vue": "^6.0.7",
"@vitejs/plugin-vue-jsx": "^5.1.5",
"@vitest/browser": "^3.0.7",
"@vitest/ui": "^3.0.7",
"@vue/babel-helper-vue-jsx-merge-props": "1.4.0",
@ -113,9 +114,9 @@
"stylelint-config-recommended-scss": "^14.0.0",
"stylelint-config-recommended-vue": "^1.6.0",
"stylelint-config-standard": "38.0.0",
"vite": "^6.1.0",
"vite-plugin-eslint2": "^5.0.3",
"vite-plugin-stylelint": "^6.0.0",
"vite": "^8.0.0",
"vite-plugin-eslint2": "^5.1.0",
"vite-plugin-stylelint": "^6.1.0",
"vitest": "^3.0.7",
"vue-eslint-parser": "10.2.0"
},

View file

@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import { defineConfig } from 'vite'
import { DevTools } from '@vitejs/devtools'
import eslint from 'vite-plugin-eslint2'
import stylelint from 'vite-plugin-stylelint'
import { configDefaults } from 'vitest/config'
@ -135,6 +136,12 @@ export default defineConfig(async ({ mode, command }) => {
},
}),
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 }),
buildSwPlugin({ swSrc, swDest }),
swMessagesPlugin(),
@ -197,12 +204,12 @@ export default defineConfig(async ({ mode, command }) => {
},
build: {
sourcemap: true,
rollupOptions: {
rolldownOptions: {
devtools: {}, // enable devtools mode
input: {
main: 'index.html',
},
output: {
inlineDynamicImports: false,
entryFileNames(chunkInfo) {
const id = chunkInfo.facadeModuleId
if (id.endsWith(swSrc)) {

1304
yarn.lock

File diff suppressed because it is too large Load diff