@salesforce/pwa-kit-dev 3.9.0 → 3.10.0-nightly-20250220080209
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.
|
@@ -45,6 +45,9 @@ const INSPECT = process.execArgv.some(arg => /^--inspect(?:-brk)?(?:$|=)/.test(a
|
|
|
45
45
|
const DEBUG = mode !== production && process.env.DEBUG === 'true';
|
|
46
46
|
const CI = process.env.CI;
|
|
47
47
|
const disableHMR = process.env.HMR === 'false';
|
|
48
|
+
if (process.env.PWA_KIT_SSR_SOURCE_MAP) {
|
|
49
|
+
console.warn('PWA_KIT_SSR_SOURCE_MAP env variable will be deprecated for source-map in the next major release. Please use PWA_KIT_SOURCE_MAP');
|
|
50
|
+
}
|
|
48
51
|
if ([production, development].indexOf(mode) < 0) {
|
|
49
52
|
throw new Error(`Invalid mode "${mode}"`);
|
|
50
53
|
}
|
|
@@ -309,7 +312,7 @@ const client = entryPointExists(['app', 'main']) && baseConfig('web').extend(wit
|
|
|
309
312
|
// Must be named "client". See - https://www.npmjs.com/package/webpack-hot-server-middleware#usage
|
|
310
313
|
name: _configNames.CLIENT,
|
|
311
314
|
// use source map to make debugging easier
|
|
312
|
-
devtool: mode === development ? 'source-map' : false,
|
|
315
|
+
devtool: mode === development || process.env.PWA_KIT_SOURCE_MAP === 'true' ? 'source-map' : false,
|
|
313
316
|
entry: {
|
|
314
317
|
main: getAppEntryPoint()
|
|
315
318
|
},
|
|
@@ -332,7 +335,7 @@ const clientOptional = baseConfig('web').extend(config => {
|
|
|
332
335
|
name: _configNames.CLIENT_OPTIONAL,
|
|
333
336
|
entry: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, optional('loader', (0, _path.resolve)(projectDir, EXT_OVERRIDES_DIR, 'app', 'loader.js'))), optional('worker', (0, _path.resolve)(projectDir, 'worker', 'main.js'))), optional('core-polyfill', (0, _path.resolve)(projectDir, 'node_modules', 'core-js'))), optional('fetch-polyfill', (0, _path.resolve)(projectDir, 'node_modules', 'whatwg-fetch'))),
|
|
334
337
|
// use source map to make debugging easier
|
|
335
|
-
devtool: mode === development ? 'source-map' : false,
|
|
338
|
+
devtool: mode === development || process.env.PWA_KIT_SOURCE_MAP === 'true' ? 'source-map' : false,
|
|
336
339
|
plugins: [...config.plugins, analyzeBundle && getBundleAnalyzerPlugin(_configNames.CLIENT_OPTIONAL)].filter(Boolean)
|
|
337
340
|
});
|
|
338
341
|
}).build();
|
|
@@ -342,7 +345,7 @@ const renderer = _fsExtra.default.existsSync((0, _path.resolve)(projectDir, 'nod
|
|
|
342
345
|
name: _configNames.SERVER,
|
|
343
346
|
entry: '@salesforce/pwa-kit-react-sdk/ssr/server/react-rendering.js',
|
|
344
347
|
// use eval-source-map for server-side debugging
|
|
345
|
-
devtool: mode === development && INSPECT ? 'eval-source-map' : false,
|
|
348
|
+
devtool: mode === development && INSPECT || process.env.PWA_KIT_SOURCE_MAP === 'true' ? 'eval-source-map' : false,
|
|
346
349
|
output: {
|
|
347
350
|
path: buildDir,
|
|
348
351
|
// We want to split the build on local development to reduce memory usage.
|
|
@@ -364,7 +367,7 @@ const ssr = (() => {
|
|
|
364
367
|
// Only compile the ssr file when we're building for prod.
|
|
365
368
|
if (mode === production) {
|
|
366
369
|
return baseConfig('node').extend(config => {
|
|
367
|
-
return _objectSpread(_objectSpread(_objectSpread({}, config), process.env.PWA_KIT_SSR_SOURCE_MAP === 'true' ? {
|
|
370
|
+
return _objectSpread(_objectSpread(_objectSpread({}, config), process.env.PWA_KIT_SSR_SOURCE_MAP === 'true' || process.env.PWA_KIT_SOURCE_MAP === 'true' ? {
|
|
368
371
|
devtool: 'source-map'
|
|
369
372
|
} : {}), {}, {
|
|
370
373
|
// Must *not* be named "server". See - https://www.npmjs.com/package/webpack-hot-server-middleware#usage
|
|
@@ -393,7 +396,7 @@ const requestProcessor = entryPointExists(['app', 'request-processor']) && baseC
|
|
|
393
396
|
libraryTarget: 'commonjs2'
|
|
394
397
|
},
|
|
395
398
|
// use eval-source-map for server-side debugging
|
|
396
|
-
devtool: mode === development && INSPECT ? 'eval-source-map' : false,
|
|
399
|
+
devtool: mode === development && INSPECT || process.env.PWA_KIT_SOURCE_MAP === 'true' ? 'eval-source-map' : false,
|
|
397
400
|
plugins: [...config.plugins, analyzeBundle && getBundleAnalyzerPlugin(_configNames.REQUEST_PROCESSOR)].filter(Boolean)
|
|
398
401
|
});
|
|
399
402
|
}).build();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/pwa-kit-dev",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0-nightly-20250220080209",
|
|
4
4
|
"description": "Build tools for pwa-kit",
|
|
5
5
|
"homepage": "https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/pwa-kit-dev#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@loadable/server": "^5.15.3",
|
|
59
59
|
"@loadable/webpack-plugin": "^5.15.2",
|
|
60
60
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
|
61
|
-
"@salesforce/pwa-kit-runtime": "3.
|
|
61
|
+
"@salesforce/pwa-kit-runtime": "3.10.0-nightly-20250220080209",
|
|
62
62
|
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
|
63
63
|
"@typescript-eslint/parser": "^5.57.0",
|
|
64
64
|
"archiver": "1.3.0",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"@types/node": "~16.0.3",
|
|
122
122
|
"@types/node-fetch": "~2.6.3",
|
|
123
123
|
"@types/validator": "~13.7.14",
|
|
124
|
-
"internal-lib-build": "3.
|
|
124
|
+
"internal-lib-build": "3.10.0-nightly-20250220080209",
|
|
125
125
|
"nock": "^13.3.0",
|
|
126
126
|
"nodemon": "^2.0.22",
|
|
127
127
|
"superagent": "^6.1.0",
|
|
@@ -147,5 +147,5 @@
|
|
|
147
147
|
"publishConfig": {
|
|
148
148
|
"directory": "dist"
|
|
149
149
|
},
|
|
150
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "8a3ab9bc723445a115eea48042cea1d5a21419ea"
|
|
151
151
|
}
|