@marko/vite 4.1.9 → 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.
- package/dist/index.mjs +7 -4
- 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) {
|
|
@@ -833,10 +840,6 @@ function markoPlugin(opts = {}) {
|
|
|
833
840
|
"Cannot use @marko/vite `basePathVar` with Vite's `renderBuiltUrl` option."
|
|
834
841
|
);
|
|
835
842
|
}
|
|
836
|
-
if (isSSRBuild && !config.build?.ssrEmitAssets) {
|
|
837
|
-
config.build ??= {};
|
|
838
|
-
config.build.assetsDir ??= "";
|
|
839
|
-
}
|
|
840
843
|
const assetsDir = config.build?.assetsDir?.replace(/[/\\]$/, "") ?? "assets";
|
|
841
844
|
const assetsDirLen = assetsDir.length;
|
|
842
845
|
const assetsDirEnd = assetsDirLen + 1;
|
package/package.json
CHANGED