@nx/angular-rspack 21.0.1 → 21.0.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.
|
@@ -9,6 +9,7 @@ const optimization_config_1 = require("./optimization-config");
|
|
|
9
9
|
const path_1 = require("path");
|
|
10
10
|
const hmr_accept_loader_1 = require("../../plugins/loaders/hmr-accept-loader");
|
|
11
11
|
async function getBrowserConfig(normalizedOptions, i18n, hashFormat, defaultConfig) {
|
|
12
|
+
const isDevServer = process.env['WEBPACK_SERVE'];
|
|
12
13
|
const isProduction = process.env['NODE_ENV'] === 'production';
|
|
13
14
|
const { root } = normalizedOptions;
|
|
14
15
|
return {
|
|
@@ -34,8 +35,7 @@ async function getBrowserConfig(normalizedOptions, i18n, hashFormat, defaultConf
|
|
|
34
35
|
cssFilename: `[name]${hashFormat.file}.css`,
|
|
35
36
|
filename: `[name]${hashFormat.chunk}.js`,
|
|
36
37
|
chunkFilename: `[name]${hashFormat.chunk}.js`,
|
|
37
|
-
scriptType: 'module',
|
|
38
|
-
module: true,
|
|
38
|
+
...(isDevServer ? {} : { scriptType: 'module', module: true }),
|
|
39
39
|
},
|
|
40
40
|
optimization: (0, optimization_config_1.getOptimization)(normalizedOptions, 'browser'),
|
|
41
41
|
module: {
|
|
@@ -11,6 +11,7 @@ const stats_json_plugin_1 = require("../../plugins/stats-json-plugin");
|
|
|
11
11
|
const watch_file_logs_plugin_1 = require("../../plugins/watch-file-logs-plugin");
|
|
12
12
|
const get_index_input_file_1 = require("../../utils/index-file/get-index-input-file");
|
|
13
13
|
async function getCommonConfig(normalizedOptions, i18n, i18nHash, hashFormat) {
|
|
14
|
+
const isDevServer = process.env['WEBPACK_SERVE'];
|
|
14
15
|
const isProduction = process.env['NODE_ENV'] === 'production';
|
|
15
16
|
const crossOriginLoading = (0, helpers_1.getCrossOriginLoading)(normalizedOptions);
|
|
16
17
|
const sourceMapOptions = (0, sourcemap_utils_1.configureSourceMap)(normalizedOptions.sourceMap);
|
|
@@ -27,7 +28,7 @@ async function getCommonConfig(normalizedOptions, i18n, i18nHash, hashFormat) {
|
|
|
27
28
|
context: normalizedOptions.root,
|
|
28
29
|
profile: normalizedOptions.statsJson,
|
|
29
30
|
mode: isProduction ? 'production' : 'development',
|
|
30
|
-
devtool: normalizedOptions.sourceMap.scripts ? 'source-map' :
|
|
31
|
+
devtool: normalizedOptions.sourceMap.scripts ? 'source-map' : false,
|
|
31
32
|
infrastructureLogging: {
|
|
32
33
|
appendOnly: false,
|
|
33
34
|
debug: normalizedOptions.verbose,
|
|
@@ -46,7 +47,7 @@ async function getCommonConfig(normalizedOptions, i18n, i18nHash, hashFormat) {
|
|
|
46
47
|
sourceMapFilename: normalizedOptions.sourceMap.scripts
|
|
47
48
|
? '[file].map'
|
|
48
49
|
: undefined,
|
|
49
|
-
scriptType: 'module',
|
|
50
|
+
...(isDevServer ? {} : { scriptType: 'module' }),
|
|
50
51
|
},
|
|
51
52
|
resolve: {
|
|
52
53
|
extensions: ['.ts', '.tsx', '.mjs', '.js'],
|
|
@@ -82,7 +83,6 @@ async function getCommonConfig(normalizedOptions, i18n, i18nHash, hashFormat) {
|
|
|
82
83
|
module: {
|
|
83
84
|
parser: {
|
|
84
85
|
javascript: {
|
|
85
|
-
requireContext: false,
|
|
86
86
|
url: false,
|
|
87
87
|
},
|
|
88
88
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular-rspack",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"tslib": "^2.3.0",
|
|
75
75
|
"webpack-merge": "^6.0.1",
|
|
76
76
|
"ws": "^8.18.0",
|
|
77
|
-
"@nx/angular-rspack-compiler": "21.0.
|
|
77
|
+
"@nx/angular-rspack-compiler": "21.0.3"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@code-pushup/models": "^0.63.0",
|