Skip to content

Commit

Permalink
fixed rollup assets clean pattern to properly preserve static files a…
Browse files Browse the repository at this point in the history
…nd del all else.
  • Loading branch information
james0r committed Aug 17, 2023
1 parent aa32679 commit 3dce55e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .config/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
},
},
build: {
sourcemap: true,
sourcemap: process.env.NODE_ENV != 'production',
rollupOptions: {
input: {
bundle: resolve(__dirname, '../src/main.js'),
Expand All @@ -41,9 +41,12 @@ export default {
},
plugins: [
process.env.NODE_ENV == 'production' &&
del({
targets: ['../shopify/assets/**/*', '!../shopify/assets/*static*'],
}),
del({
targets: [
resolve(__dirname, '../shopify/assets/!(*.static.*)'),
],
verbose: true
}),
],
},
outDir: resolve(__dirname, '../shopify/assets'),
Expand Down

0 comments on commit 3dce55e

Please sign in to comment.