Skip to content

Commit

Permalink
fix(mc-scripts): treat *.css imports as side effects (#2887)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmenko committed Nov 18, 2022
1 parent c864e29 commit b0a35ec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/rude-cups-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@commercetools-frontend/mc-scripts': patch
---

Treat `*.css` imports as side effects in Webpack loaders
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,11 @@ function createWebpackConfigForDevelopment(
},
},
],
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ function createWebpackConfigForProduction(
},
},
],
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
],
},
Expand Down

1 comment on commit b0a35ec

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for merchant-center-application-kit ready!

✅ Preview
https://merchant-center-application-5vb87e5xn-commercetools.vercel.app

Built with commit b0a35ec.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.