@marko/vite 5.0.13 → 5.0.14

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 +5 -0
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1010,6 +1010,11 @@ function markoPlugin(opts = {}) {
1010
1010
  chunkFileNames: `[name]-[hash].js`
1011
1011
  };
1012
1012
  }
1013
+ if (isSSRBuild && !config.build?.commonjsOptions?.esmExternals) {
1014
+ config.build ??= {};
1015
+ config.build.commonjsOptions ??= {};
1016
+ config.build.commonjsOptions.esmExternals = (id) => !isCJSModule(id);
1017
+ }
1013
1018
  if (basePathVar) {
1014
1019
  config.experimental ??= {};
1015
1020
  if (config.experimental.renderBuiltUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/vite",
3
- "version": "5.0.13",
3
+ "version": "5.0.14",
4
4
  "description": "A Marko plugin for Vite",
5
5
  "keywords": [
6
6
  "loader",