kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
fix(dx): enable quicker rebuilds in development by skipping unnecessary compatibility options
rodzic
7ff624b51b
commit
cb3570627c
|
@ -1,5 +1,7 @@
|
||||||
export default {
|
export default {
|
||||||
plugins: {
|
plugins: process.env.NODE_ENV === 'development' ? {
|
||||||
|
// Skip autoprefixer in development - modern dev browsers don't need prefixes
|
||||||
|
} : {
|
||||||
autoprefixer: {
|
autoprefixer: {
|
||||||
overrideBrowserslist: [
|
overrideBrowserslist: [
|
||||||
'> 1%',
|
'> 1%',
|
||||||
|
|
|
@ -73,7 +73,14 @@ export default defineConfig(({ mode }) => ({
|
||||||
watch: {
|
watch: {
|
||||||
usePolling: true
|
usePolling: true
|
||||||
},
|
},
|
||||||
allowedHosts: [".funkwhale.test"]
|
allowedHosts: [".funkwhale.test"],
|
||||||
|
hmr: {
|
||||||
|
overlay: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
include: ['vue', 'vue-router', 'pinia', 'axios', 'lodash-es'],
|
||||||
|
exclude: ['@sentry/vue', '@sentry/tracing']
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: [
|
alias: [
|
||||||
|
@ -95,17 +102,20 @@ export default defineConfig(({ mode }) => ({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
esbuild: {
|
esbuild: {
|
||||||
target: 'es2020',
|
target: mode === 'development' ? 'esnext' : 'es2020',
|
||||||
supported: {
|
supported: {
|
||||||
'top-level-await': true
|
'top-level-await': true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
target: ['es2020', 'chrome87', 'firefox78', 'safari14', 'edge88'],
|
target: mode === 'development'
|
||||||
|
? 'esnext'
|
||||||
|
: ['es2020', 'chrome87', 'firefox78', 'safari14', 'edge88'],
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
|
minify: mode === 'development' ? false : 'esbuild',
|
||||||
// https://rollupjs.org/configuration-options/
|
// https://rollupjs.org/configuration-options/
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: mode === 'production' ? {
|
||||||
manualChunks: {
|
manualChunks: {
|
||||||
axios: ['axios', 'axios-auth-refresh'],
|
axios: ['axios', 'axios-auth-refresh'],
|
||||||
dompurify: ['dompurify'],
|
dompurify: ['dompurify'],
|
||||||
|
@ -116,7 +126,7 @@ export default defineConfig(({ mode }) => ({
|
||||||
'standardized-audio-context': ['standardized-audio-context'],
|
'standardized-audio-context': ['standardized-audio-context'],
|
||||||
'vue-router': ['vue-router']
|
'vue-router': ['vue-router']
|
||||||
}
|
}
|
||||||
}
|
} : {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
test: {
|
test: {
|
||||||
|
|
Ładowanie…
Reference in New Issue