@marko/vite 5.1.1 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -0
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1336,6 +1336,13 @@ if (import.meta.hot) import.meta.hot.accept(() => {});`;
1336
1336
  apply: "build",
1337
1337
  enforce: "post",
1338
1338
  // We use a "post" plugin to allow us to read the final generated `.html` from vite.
1339
+ transform(_source, id, opts2) {
1340
+ if (!opts2?.ssr && /\.module\.[^.]+(?:\?|$)/.test(id)) {
1341
+ return {
1342
+ moduleSideEffects: "no-treeshake"
1343
+ };
1344
+ }
1345
+ },
1339
1346
  async generateBundle(outputOptions, bundle, isWrite) {
1340
1347
  if (!linked) {
1341
1348
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/vite",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "A Marko plugin for Vite",
5
5
  "keywords": [
6
6
  "loader",