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 {
|
||||
plugins: {
|
||||
plugins: process.env.NODE_ENV === 'development' ? {
|
||||
// Skip autoprefixer in development - modern dev browsers don't need prefixes
|
||||
} : {
|
||||
autoprefixer: {
|
||||
overrideBrowserslist: [
|
||||
'> 1%',
|
||||
|
|
|
@ -73,7 +73,14 @@ export default defineConfig(({ mode }) => ({
|
|||
watch: {
|
||||
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: {
|
||||
alias: [
|
||||
|
@ -95,17 +102,20 @@ export default defineConfig(({ mode }) => ({
|
|||
}
|
||||
},
|
||||
esbuild: {
|
||||
target: 'es2020',
|
||||
target: mode === 'development' ? 'esnext' : 'es2020',
|
||||
supported: {
|
||||
'top-level-await': true
|
||||
}
|
||||
},
|
||||
build: {
|
||||
target: ['es2020', 'chrome87', 'firefox78', 'safari14', 'edge88'],
|
||||
target: mode === 'development'
|
||||
? 'esnext'
|
||||
: ['es2020', 'chrome87', 'firefox78', 'safari14', 'edge88'],
|
||||
sourcemap: true,
|
||||
minify: mode === 'development' ? false : 'esbuild',
|
||||
// https://rollupjs.org/configuration-options/
|
||||
rollupOptions: {
|
||||
output: {
|
||||
output: mode === 'production' ? {
|
||||
manualChunks: {
|
||||
axios: ['axios', 'axios-auth-refresh'],
|
||||
dompurify: ['dompurify'],
|
||||
|
@ -116,7 +126,7 @@ export default defineConfig(({ mode }) => ({
|
|||
'standardized-audio-context': ['standardized-audio-context'],
|
||||
'vue-router': ['vue-router']
|
||||
}
|
||||
}
|
||||
} : {}
|
||||
}
|
||||
},
|
||||
test: {
|
||||
|
|
Ładowanie…
Reference in New Issue