@jsenv/core 31.1.1 → 31.1.3

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/main.js CHANGED
@@ -18005,8 +18005,8 @@ const replacePlaceholders = (urlInfo, replacements) => {
18005
18005
  const jsenvPluginGlobalScenarios = () => {
18006
18006
  const transformIfNeeded = (urlInfo, context) => {
18007
18007
  return replacePlaceholders(urlInfo, {
18008
- false: context.dev,
18009
- true: context.build
18008
+ __DEV__: context.dev,
18009
+ __BUILD__: context.build
18010
18010
  });
18011
18011
  };
18012
18012
  return {
@@ -20310,6 +20310,7 @@ const getCorePlugins = ({
20310
20310
  clientFilesPruneCallbackList,
20311
20311
  explorer,
20312
20312
  cacheControl,
20313
+ scenarioPlaceholders = true,
20313
20314
  ribbon = true
20314
20315
  } = {}) => {
20315
20316
  if (explorer === true) {
@@ -20352,7 +20353,7 @@ const getCorePlugins = ({
20352
20353
  runtimeCompat,
20353
20354
  clientMainFileUrl,
20354
20355
  urlResolution
20355
- }), jsenvPluginUrlVersion(), jsenvPluginCommonJsGlobals(), jsenvPluginImportMetaScenarios(), jsenvPluginGlobalScenarios(), jsenvPluginNodeRuntime({
20356
+ }), jsenvPluginUrlVersion(), jsenvPluginCommonJsGlobals(), jsenvPluginImportMetaScenarios(), ...(scenarioPlaceholders ? [jsenvPluginGlobalScenarios()] : []), jsenvPluginNodeRuntime({
20356
20357
  runtimeCompat
20357
20358
  }), jsenvPluginImportMetaHot(), ...(clientAutoreload ? [jsenvPluginAutoreload({
20358
20359
  ...clientAutoreload,
@@ -20762,6 +20763,7 @@ const build = async ({
20762
20763
  urlResolution,
20763
20764
  fileSystemMagicRedirection,
20764
20765
  directoryReferenceAllowed,
20766
+ scenarioPlaceholders,
20765
20767
  transpilation = {},
20766
20768
  versioning = !runtimeCompat.node,
20767
20769
  versioningMethod = "search_param",
@@ -20904,7 +20906,8 @@ build ${entryPointKeys.length} entry points`);
20904
20906
  ...transpilation,
20905
20907
  babelHelpersAsImport: !useExplicitJsClassicConversion,
20906
20908
  jsClassicFallback: false
20907
- }
20909
+ },
20910
+ scenarioPlaceholders
20908
20911
  })],
20909
20912
  sourcemaps,
20910
20913
  sourcemapsSourcesContent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "31.1.1",
3
+ "version": "31.1.3",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -74,7 +74,7 @@
74
74
  "@jsenv/integrity": "0.0.1",
75
75
  "@jsenv/log": "3.3.4",
76
76
  "@jsenv/node-esm-resolution": "1.0.1",
77
- "@jsenv/plugin-bundling": "2.0.0",
77
+ "@jsenv/plugin-bundling": "2.0.1",
78
78
  "@jsenv/server": "15.0.0",
79
79
  "@jsenv/sourcemap": "1.0.9",
80
80
  "@jsenv/uneval": "1.6.0",
@@ -138,6 +138,7 @@ export const build = async ({
138
138
  urlResolution,
139
139
  fileSystemMagicRedirection,
140
140
  directoryReferenceAllowed,
141
+ scenarioPlaceholders,
141
142
  transpilation = {},
142
143
  versioning = !runtimeCompat.node,
143
144
  versioningMethod = "search_param", // "filename", "search_param"
@@ -316,6 +317,7 @@ build ${entryPointKeys.length} entry points`)
316
317
  babelHelpersAsImport: !useExplicitJsClassicConversion,
317
318
  jsClassicFallback: false,
318
319
  },
320
+ scenarioPlaceholders,
319
321
  }),
320
322
  ],
321
323
  sourcemaps,
@@ -40,6 +40,7 @@ export const getCorePlugins = ({
40
40
  clientFilesPruneCallbackList,
41
41
  explorer,
42
42
  cacheControl,
43
+ scenarioPlaceholders = true,
43
44
  ribbon = true,
44
45
  } = {}) => {
45
46
  if (explorer === true) {
@@ -90,7 +91,7 @@ export const getCorePlugins = ({
90
91
  jsenvPluginUrlVersion(),
91
92
  jsenvPluginCommonJsGlobals(),
92
93
  jsenvPluginImportMetaScenarios(),
93
- jsenvPluginGlobalScenarios(),
94
+ ...(scenarioPlaceholders ? [jsenvPluginGlobalScenarios()] : []),
94
95
 
95
96
  jsenvPluginNodeRuntime({ runtimeCompat }),
96
97