@marko/vite 5.0.11 → 5.0.12
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 +5 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -865,6 +865,11 @@ function markoPlugin(opts = {}) {
|
|
|
865
865
|
// Must be pre to allow us to resolve assets before vite.
|
|
866
866
|
async config(config, env) {
|
|
867
867
|
let optimize = env.mode === "production";
|
|
868
|
+
isTest = env.mode === "test";
|
|
869
|
+
isBuild = env.command === "build";
|
|
870
|
+
if (isTest) {
|
|
871
|
+
linked = false;
|
|
872
|
+
}
|
|
868
873
|
if ("MARKO_DEBUG" in process.env) {
|
|
869
874
|
optimize = process.env.MARKO_DEBUG === "false" || process.env.MARKO_DEBUG === "0";
|
|
870
875
|
} else {
|
|
@@ -921,8 +926,6 @@ function markoPlugin(opts = {}) {
|
|
|
921
926
|
compiler2.configure(baseConfig);
|
|
922
927
|
devEntryFile = path6.join(root, "index.html");
|
|
923
928
|
devEntryFilePosix = normalizePath(devEntryFile);
|
|
924
|
-
isTest = env.mode === "test";
|
|
925
|
-
isBuild = env.command === "build";
|
|
926
929
|
isSSRBuild = isBuild && linked && Boolean(config.build.ssr);
|
|
927
930
|
renderAssetsRuntimeCode = getRenderAssetsRuntime({
|
|
928
931
|
isBuild,
|
|
@@ -930,7 +933,6 @@ function markoPlugin(opts = {}) {
|
|
|
930
933
|
runtimeId
|
|
931
934
|
});
|
|
932
935
|
if (isTest) {
|
|
933
|
-
linked = false;
|
|
934
936
|
const { test } = config;
|
|
935
937
|
if (test.environment?.includes("dom")) {
|
|
936
938
|
config.resolve ??= {};
|