@marko/vite 4.1.8 → 4.1.10

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 +11 -7
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -826,6 +826,13 @@ function markoPlugin(opts = {}) {
826
826
  ssr.noExternal = noExternalReg;
827
827
  }
828
828
  }
829
+ if (isSSRBuild && !config.build?.rollupOptions?.output) {
830
+ config.build ??= {};
831
+ config.build.rollupOptions ??= {};
832
+ config.build.rollupOptions.output = {
833
+ chunkFileNames: `[name]-[hash].js`
834
+ };
835
+ }
829
836
  if (basePathVar) {
830
837
  config.experimental ??= {};
831
838
  if (config.experimental.renderBuiltUrl) {
@@ -1168,13 +1175,10 @@ if (import.meta.hot) import.meta.hot.accept(() => {});`;
1168
1175
  for (const fileName in bundle) {
1169
1176
  const chunk = bundle[fileName];
1170
1177
  if (chunk.type === "chunk") {
1171
- for (const id in chunk.modules) {
1172
- if (id.endsWith(serverEntryQuery)) {
1173
- serverManifest.chunksNeedingAssets.push(
1174
- path5.resolve(dir, fileName)
1175
- );
1176
- break;
1177
- }
1178
+ if (chunk.moduleIds.includes(renderAssetsRuntimeId)) {
1179
+ serverManifest.chunksNeedingAssets.push(
1180
+ path5.resolve(dir, fileName)
1181
+ );
1178
1182
  }
1179
1183
  }
1180
1184
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marko/vite",
3
3
  "description": "A Marko plugin for Vite",
4
- "version": "4.1.8",
4
+ "version": "4.1.10",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/vite/issues",
7
7
  "dependencies": {