@spicemod/creator 0.0.21 → 0.0.22
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/bin.mjs +4 -3
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -135,7 +135,7 @@ const templateFilePath = dist("templates/wrapper.js", import.meta.url);
|
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region package.json
|
|
137
137
|
var name = "@spicemod/creator";
|
|
138
|
-
var version = "0.0.
|
|
138
|
+
var version = "0.0.22";
|
|
139
139
|
|
|
140
140
|
//#endregion
|
|
141
141
|
//#region src/utils/common.ts
|
|
@@ -454,6 +454,7 @@ async function resolveContext(config) {
|
|
|
454
454
|
if (!config.entry.js || config.entry.js.length === 0) config.entry.js = resolveDefaultEntries(cwd, "js");
|
|
455
455
|
if (!config.entry.css || config.entry.css.length === 0) config.entry.css = resolveDefaultEntries(cwd, "css");
|
|
456
456
|
} else config.entry = resolveDefaultEntries(cwd, "js");
|
|
457
|
+
if (!config.devModeVarName) config.devModeVarName = DEV_MODE_VAR_NAME;
|
|
457
458
|
config.outDir = resolve(cwd, config.outDir || "./dist");
|
|
458
459
|
config.esbuildOptions ??= {};
|
|
459
460
|
config.serverConfig ??= {};
|
|
@@ -948,7 +949,7 @@ function getJSBuildOptions(config, options) {
|
|
|
948
949
|
],
|
|
949
950
|
define: {
|
|
950
951
|
[DEV_MODE_VAR_NAME]: "false",
|
|
951
|
-
|
|
952
|
+
[config.devModeVarName]: "false",
|
|
952
953
|
...config.esbuildOptions.define
|
|
953
954
|
},
|
|
954
955
|
plugins: [...config.esbuildOptions?.plugins ? config.esbuildOptions.plugins : [], ...getCommonPlugins({
|
|
@@ -1733,7 +1734,7 @@ function getJSDevOptions(config, options) {
|
|
|
1733
1734
|
],
|
|
1734
1735
|
define: {
|
|
1735
1736
|
[DEV_MODE_VAR_NAME]: "true",
|
|
1736
|
-
|
|
1737
|
+
[config.devModeVarName]: "true",
|
|
1737
1738
|
...config.esbuildOptions.define
|
|
1738
1739
|
},
|
|
1739
1740
|
plugins: [...config.esbuildOptions?.plugins ? config.esbuildOptions.plugins : [], ...getCommonPlugins({
|