Commit 473fe958 by 张立顺

fix: 隔离小程序开发态Node脚本

1 parent e25de2ce
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
"useCompilerPlugins": [ "useCompilerPlugins": [
"sass" "sass"
], ],
"ignoreDevUnusedFiles": false, "ignoreDevUnusedFiles": true,
"minifyWXML": true, "minifyWXML": true,
"compileWorklet": false, "compileWorklet": false,
"uglifyFileName": false, "uglifyFileName": false,
...@@ -194,4 +194,4 @@ ...@@ -194,4 +194,4 @@
}, },
"appid": "wx570d9331f9ace0bd", "appid": "wx570d9331f9ace0bd",
"simulatorPluginLibVersion": {} "simulatorPluginLibVersion": {}
}
\ No newline at end of file \ No newline at end of file
}
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"urlCheck": false, "urlCheck": false,
"coverView": true, "coverView": true,
"showShadowRootInWxmlPanel": true, "showShadowRootInWxmlPanel": true,
"ignoreDevUnusedFiles": false, "ignoreDevUnusedFiles": true,
"lazyloadPlaceholderEnable": false, "lazyloadPlaceholderEnable": false,
"skylineRenderEnable": false, "skylineRenderEnable": false,
"preloadBackgroundData": false, "preloadBackgroundData": false,
......
...@@ -13,3 +13,14 @@ test('upload configuration excludes migration docs, tests, and scripts', () => { ...@@ -13,3 +13,14 @@ test('upload configuration excludes migration docs, tests, and scripts', () => {
assert.ok(ignored.has(directory), `${directory} must be excluded from upload`); assert.ok(ignored.has(directory), `${directory} must be excluded from upload`);
} }
}); });
test('development compilation excludes unreferenced Node-only scripts', () => {
for (const configFile of ['project.config.json', 'project.private.config.json']) {
const config = JSON.parse(readFileSync(path.join(projectRoot, configFile), 'utf8'));
assert.equal(
config.setting?.ignoreDevUnusedFiles,
true,
`${configFile} must not compile unreferenced Node-only test and script files`,
);
}
});
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!