@nx/angular-rspack 20.5.0-beta.2 → 20.6.0-beta.0
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/lib/config/create-config.d.ts.map +1 -1
- package/dist/lib/config/create-config.js +27 -22
- package/dist/lib/config/style-config-utils.d.ts +59 -23
- package/dist/lib/config/style-config-utils.d.ts.map +1 -1
- package/dist/lib/config/style-config-utils.js +51 -2
- package/dist/lib/models/angular-rspack-plugin-options.d.ts +11 -8
- package/dist/lib/models/angular-rspack-plugin-options.d.ts.map +1 -1
- package/dist/lib/models/augmented-compilation.d.ts +1 -1
- package/dist/lib/models/augmented-compilation.d.ts.map +1 -1
- package/dist/lib/models/normalize-options.d.ts.map +1 -1
- package/dist/lib/models/normalize-options.js +6 -3
- package/dist/lib/plugins/loaders/angular-transform.loader.d.ts +5 -1
- package/dist/lib/plugins/loaders/angular-transform.loader.d.ts.map +1 -1
- package/dist/lib/plugins/loaders/angular-transform.loader.js +4 -3
- package/dist/lib/plugins/ng-rspack.d.ts.map +1 -1
- package/dist/lib/plugins/ng-rspack.js +3 -9
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-config.d.ts","sourceRoot":"","sources":["../../../src/lib/config/create-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"create-config.d.ts","sourceRoot":"","sources":["../../../src/lib/config/create-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EAOd,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,0BAA0B,EAG3B,MAAM,WAAW,CAAC;AAkEnB,wBAAsB,aAAa,CACjC,OAAO,EAAE,0BAA0B,EACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAC7C,OAAO,CAAC,aAAa,EAAE,CAAC,CAuX1B;AAED,wBAAsB,YAAY,CAChC,cAAc,EAAE;IACd,OAAO,EAAE,0BAA0B,CAAC;IACpC,qBAAqB,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CAChD,EACD,cAAc,GAAE,MAAM,CACpB,MAAM,EACN;IACE,OAAO,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC7C,qBAAqB,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CAChD,CACG,EACN,YAAY,SAAgB,GAC3B,OAAO,CAAC,aAAa,EAAE,CAAC,CAyB1B"}
|
|
@@ -86,18 +86,12 @@ async function _createConfig(options, rspackConfigOverrides) {
|
|
|
86
86
|
configFile: normalizedOptions.tsConfig,
|
|
87
87
|
},
|
|
88
88
|
},
|
|
89
|
-
experiments: {
|
|
90
|
-
css: true,
|
|
91
|
-
},
|
|
92
89
|
module: {
|
|
93
90
|
parser: {
|
|
94
91
|
javascript: {
|
|
95
92
|
requireContext: false,
|
|
96
93
|
url: false,
|
|
97
94
|
},
|
|
98
|
-
'css/auto': {
|
|
99
|
-
esModule: true,
|
|
100
|
-
},
|
|
101
95
|
},
|
|
102
96
|
rules: [
|
|
103
97
|
...(0, style_config_utils_1.getStyleLoaders)(normalizedOptions.stylePreprocessorOptions, normalizedOptions.sourceMap),
|
|
@@ -132,7 +126,12 @@ async function _createConfig(options, rspackConfigOverrides) {
|
|
|
132
126
|
},
|
|
133
127
|
],
|
|
134
128
|
},
|
|
135
|
-
plugins: [
|
|
129
|
+
plugins: [
|
|
130
|
+
...sourceMapPlugins,
|
|
131
|
+
new core_1.CssExtractRspackPlugin({
|
|
132
|
+
filename: `[name]${hashFormat.extract}.css`,
|
|
133
|
+
}),
|
|
134
|
+
],
|
|
136
135
|
};
|
|
137
136
|
const configs = [];
|
|
138
137
|
if (normalizedOptions.hasServer) {
|
|
@@ -160,8 +159,8 @@ async function _createConfig(options, rspackConfigOverrides) {
|
|
|
160
159
|
allowedHosts: 'auto',
|
|
161
160
|
client: {
|
|
162
161
|
webSocketURL: {
|
|
163
|
-
hostname:
|
|
164
|
-
port: normalizedOptions.devServer
|
|
162
|
+
hostname: normalizedOptions.devServer.host,
|
|
163
|
+
port: normalizedOptions.devServer.port,
|
|
165
164
|
},
|
|
166
165
|
overlay: {
|
|
167
166
|
errors: true,
|
|
@@ -170,7 +169,8 @@ async function _createConfig(options, rspackConfigOverrides) {
|
|
|
170
169
|
},
|
|
171
170
|
reconnect: true,
|
|
172
171
|
},
|
|
173
|
-
|
|
172
|
+
host: normalizedOptions.devServer.host,
|
|
173
|
+
port: normalizedOptions.devServer.port,
|
|
174
174
|
hot: false,
|
|
175
175
|
liveReload: true,
|
|
176
176
|
watchFiles: ['./src/**/*.*', './public/**/*.*'],
|
|
@@ -182,16 +182,16 @@ async function _createConfig(options, rspackConfigOverrides) {
|
|
|
182
182
|
writeToDisk: (file) => !file.includes('.hot-update.'),
|
|
183
183
|
},
|
|
184
184
|
server: {
|
|
185
|
-
options: normalizedOptions.devServer
|
|
186
|
-
normalizedOptions.devServer
|
|
185
|
+
options: normalizedOptions.devServer.sslKey &&
|
|
186
|
+
normalizedOptions.devServer.sslCert
|
|
187
187
|
? {
|
|
188
188
|
key: (0, path_1.resolve)(root, normalizedOptions.devServer.sslKey),
|
|
189
189
|
cert: (0, path_1.resolve)(root, normalizedOptions.devServer.sslCert),
|
|
190
190
|
}
|
|
191
191
|
: {},
|
|
192
|
-
type: normalizedOptions.devServer
|
|
192
|
+
type: normalizedOptions.devServer.ssl ? 'https' : 'http',
|
|
193
193
|
},
|
|
194
|
-
proxy: await (0, dev_server_config_utils_1.getProxyConfig)(root, normalizedOptions.devServer
|
|
194
|
+
proxy: await (0, dev_server_config_utils_1.getProxyConfig)(root, normalizedOptions.devServer.proxyConfig),
|
|
195
195
|
},
|
|
196
196
|
optimization: {
|
|
197
197
|
chunkIds: normalizedOptions.namedChunks ? 'named' : 'deterministic',
|
|
@@ -269,6 +269,9 @@ async function _createConfig(options, rspackConfigOverrides) {
|
|
|
269
269
|
main: {
|
|
270
270
|
import: [normalizedOptions.browser],
|
|
271
271
|
},
|
|
272
|
+
styles: {
|
|
273
|
+
import: (0, style_config_utils_1.getStylesEntry)(normalizedOptions),
|
|
274
|
+
},
|
|
272
275
|
},
|
|
273
276
|
devServer: {
|
|
274
277
|
headers: {
|
|
@@ -277,8 +280,8 @@ async function _createConfig(options, rspackConfigOverrides) {
|
|
|
277
280
|
allowedHosts: 'auto',
|
|
278
281
|
client: {
|
|
279
282
|
webSocketURL: {
|
|
280
|
-
hostname:
|
|
281
|
-
port:
|
|
283
|
+
hostname: normalizedOptions.devServer.host,
|
|
284
|
+
port: normalizedOptions.devServer.port,
|
|
282
285
|
},
|
|
283
286
|
overlay: {
|
|
284
287
|
errors: true,
|
|
@@ -297,23 +300,25 @@ async function _createConfig(options, rspackConfigOverrides) {
|
|
|
297
300
|
devMiddleware: {
|
|
298
301
|
writeToDisk: (file) => !file.includes('.hot-update.'),
|
|
299
302
|
},
|
|
300
|
-
|
|
303
|
+
host: normalizedOptions.devServer.host,
|
|
304
|
+
port: normalizedOptions.devServer.port,
|
|
301
305
|
server: {
|
|
302
|
-
options: normalizedOptions.devServer
|
|
303
|
-
normalizedOptions.devServer
|
|
306
|
+
options: normalizedOptions.devServer.sslKey &&
|
|
307
|
+
normalizedOptions.devServer.sslCert
|
|
304
308
|
? {
|
|
305
309
|
key: (0, path_1.resolve)(root, normalizedOptions.devServer.sslKey),
|
|
306
310
|
cert: (0, path_1.resolve)(root, normalizedOptions.devServer.sslCert),
|
|
307
311
|
}
|
|
308
312
|
: {},
|
|
309
|
-
type: normalizedOptions.devServer
|
|
313
|
+
type: normalizedOptions.devServer.ssl ? 'https' : 'http',
|
|
310
314
|
},
|
|
311
|
-
proxy: await (0, dev_server_config_utils_1.getProxyConfig)(root, normalizedOptions.devServer
|
|
315
|
+
proxy: await (0, dev_server_config_utils_1.getProxyConfig)(root, normalizedOptions.devServer.proxyConfig),
|
|
312
316
|
onListening: (devServer) => {
|
|
313
317
|
if (!devServer) {
|
|
314
318
|
throw new Error('@rspack/dev-server is not defined');
|
|
315
319
|
}
|
|
316
|
-
const port = devServer.server?.address()?.port ??
|
|
320
|
+
const port = devServer.server?.address()?.port ??
|
|
321
|
+
normalizedOptions.devServer.port;
|
|
317
322
|
console.log('Listening on port:', port);
|
|
318
323
|
},
|
|
319
324
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StylePreprocessorOptions } from '@nx/angular-rspack-compiler';
|
|
2
|
-
import { SourceMap } from '../models';
|
|
2
|
+
import { NormalizedAngularRspackPluginOptions, SourceMap } from '../models';
|
|
3
3
|
export declare function getIncludePathOptions(includePaths?: string[]): {
|
|
4
4
|
less: {
|
|
5
5
|
paths?: undefined;
|
|
@@ -19,7 +19,21 @@ export declare function getSassLoaderConfig(sassPathOptions?: {
|
|
|
19
19
|
includePaths?: string[];
|
|
20
20
|
}, sassOptions?: StylePreprocessorOptions['sass'], sourceMap?: SourceMap): {
|
|
21
21
|
test: RegExp;
|
|
22
|
-
use: {
|
|
22
|
+
use: (string | {
|
|
23
|
+
loader: string;
|
|
24
|
+
options: {
|
|
25
|
+
url: boolean;
|
|
26
|
+
sourceMap: boolean | undefined;
|
|
27
|
+
importLoaders: number;
|
|
28
|
+
};
|
|
29
|
+
} | {
|
|
30
|
+
loader: string;
|
|
31
|
+
options: {
|
|
32
|
+
sourceMap: boolean | undefined;
|
|
33
|
+
url?: undefined;
|
|
34
|
+
importLoaders?: undefined;
|
|
35
|
+
};
|
|
36
|
+
} | {
|
|
23
37
|
loader: string;
|
|
24
38
|
options: {
|
|
25
39
|
fatalDeprecations?: import("sass-embedded").DeprecationOrId[];
|
|
@@ -109,7 +123,10 @@ export declare function getSassLoaderConfig(sassPathOptions?: {
|
|
|
109
123
|
};
|
|
110
124
|
api: string;
|
|
111
125
|
sourceMap: boolean | undefined;
|
|
126
|
+
sourceMapIncludeSources: boolean;
|
|
112
127
|
implementation: string;
|
|
128
|
+
url?: undefined;
|
|
129
|
+
importLoaders?: undefined;
|
|
113
130
|
} | {
|
|
114
131
|
fatalDeprecations?: import("sass-embedded").DeprecationOrId[];
|
|
115
132
|
futureDeprecations?: import("sass-embedded").DeprecationOrId[];
|
|
@@ -117,24 +134,34 @@ export declare function getSassLoaderConfig(sassPathOptions?: {
|
|
|
117
134
|
includePaths?: string[];
|
|
118
135
|
api: string;
|
|
119
136
|
sourceMap: boolean | undefined;
|
|
137
|
+
sourceMapIncludeSources: boolean;
|
|
120
138
|
implementation: string;
|
|
139
|
+
url?: undefined;
|
|
140
|
+
importLoaders?: undefined;
|
|
121
141
|
};
|
|
122
|
-
}[];
|
|
123
|
-
type: string;
|
|
142
|
+
})[];
|
|
124
143
|
};
|
|
125
144
|
export declare function getLessLoaderConfig(lessPathOptions?: {
|
|
126
145
|
paths?: string[];
|
|
127
146
|
}, sourceMap?: SourceMap): {
|
|
128
147
|
test: RegExp;
|
|
129
|
-
use: {
|
|
148
|
+
use: (string | {
|
|
149
|
+
loader: string;
|
|
150
|
+
options: {
|
|
151
|
+
url: boolean;
|
|
152
|
+
sourceMap: boolean | undefined;
|
|
153
|
+
importLoaders: number;
|
|
154
|
+
};
|
|
155
|
+
} | {
|
|
130
156
|
loader: string;
|
|
131
157
|
options: {
|
|
132
158
|
paths?: string[];
|
|
133
159
|
sourceMap: boolean | undefined;
|
|
134
160
|
javascriptEnabled: boolean;
|
|
161
|
+
url?: undefined;
|
|
162
|
+
importLoaders?: undefined;
|
|
135
163
|
};
|
|
136
|
-
}[];
|
|
137
|
-
type: string;
|
|
164
|
+
})[];
|
|
138
165
|
};
|
|
139
166
|
/**
|
|
140
167
|
* Returns an array of style loaders for sass and less. Both loader´s are always returned
|
|
@@ -142,9 +169,23 @@ export declare function getLessLoaderConfig(lessPathOptions?: {
|
|
|
142
169
|
* @param stylePreprocessorOptions
|
|
143
170
|
* @param sourceMap
|
|
144
171
|
*/
|
|
145
|
-
export declare function getStyleLoaders(stylePreprocessorOptions?: StylePreprocessorOptions, sourceMap?: SourceMap):
|
|
172
|
+
export declare function getStyleLoaders(stylePreprocessorOptions?: StylePreprocessorOptions, sourceMap?: SourceMap): {
|
|
146
173
|
test: RegExp;
|
|
147
|
-
use: {
|
|
174
|
+
use: (string | {
|
|
175
|
+
loader: string;
|
|
176
|
+
options: {
|
|
177
|
+
url: boolean;
|
|
178
|
+
sourceMap: boolean | undefined;
|
|
179
|
+
importLoaders: number;
|
|
180
|
+
};
|
|
181
|
+
} | {
|
|
182
|
+
loader: string;
|
|
183
|
+
options: {
|
|
184
|
+
sourceMap: boolean | undefined;
|
|
185
|
+
url?: undefined;
|
|
186
|
+
importLoaders?: undefined;
|
|
187
|
+
};
|
|
188
|
+
} | {
|
|
148
189
|
loader: string;
|
|
149
190
|
options: {
|
|
150
191
|
fatalDeprecations?: import("sass-embedded").DeprecationOrId[];
|
|
@@ -234,7 +275,10 @@ export declare function getStyleLoaders(stylePreprocessorOptions?: StylePreproce
|
|
|
234
275
|
};
|
|
235
276
|
api: string;
|
|
236
277
|
sourceMap: boolean | undefined;
|
|
278
|
+
sourceMapIncludeSources: boolean;
|
|
237
279
|
implementation: string;
|
|
280
|
+
url?: undefined;
|
|
281
|
+
importLoaders?: undefined;
|
|
238
282
|
} | {
|
|
239
283
|
fatalDeprecations?: import("sass-embedded").DeprecationOrId[];
|
|
240
284
|
futureDeprecations?: import("sass-embedded").DeprecationOrId[];
|
|
@@ -242,20 +286,12 @@ export declare function getStyleLoaders(stylePreprocessorOptions?: StylePreproce
|
|
|
242
286
|
includePaths?: string[];
|
|
243
287
|
api: string;
|
|
244
288
|
sourceMap: boolean | undefined;
|
|
289
|
+
sourceMapIncludeSources: boolean;
|
|
245
290
|
implementation: string;
|
|
291
|
+
url?: undefined;
|
|
292
|
+
importLoaders?: undefined;
|
|
246
293
|
};
|
|
247
|
-
}[];
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
test: RegExp;
|
|
251
|
-
use: {
|
|
252
|
-
loader: string;
|
|
253
|
-
options: {
|
|
254
|
-
paths?: string[];
|
|
255
|
-
sourceMap: boolean | undefined;
|
|
256
|
-
javascriptEnabled: boolean;
|
|
257
|
-
};
|
|
258
|
-
}[];
|
|
259
|
-
type: string;
|
|
260
|
-
})[];
|
|
294
|
+
})[];
|
|
295
|
+
}[];
|
|
296
|
+
export declare function getStylesEntry(options: NormalizedAngularRspackPluginOptions): string[];
|
|
261
297
|
//# sourceMappingURL=style-config-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-config-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/config/style-config-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"style-config-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/config/style-config-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,oCAAoC,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAG5E,wBAAgB,qBAAqB,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE;;;;;;;;;;;;;;EAS5D;AAED,wBAAgB,mBAAmB,CACjC,eAAe,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,EAC7C,WAAW,CAAC,EAAE,wBAAwB,CAAC,MAAM,CAAC,EAC9C,SAAS,CAAC,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;sEAgHoT,mBAAmB,QAAQ,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAlHtV,MAAM,EAAE;;;;;;;;;EAmC5C;AAED,wBAAgB,mBAAmB,CACjC,eAAe,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,EACtC,SAAS,CAAC,EAAE,SAAS;;;;;;;;;;;;oBADO,MAAM,EAAE;;;;;;;EAyBrC;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,wBAAwB,CAAC,EAAE,wBAAwB,EACnD,SAAS,CAAC,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;sEAyCoT,mBAAmB,QAAQ,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAlHtV,MAAM,EAAE;;;;;;;;;IAoG5C;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,oCAAoC,GAC5C,MAAM,EAAE,CASV"}
|
|
@@ -4,6 +4,8 @@ exports.getIncludePathOptions = getIncludePathOptions;
|
|
|
4
4
|
exports.getSassLoaderConfig = getSassLoaderConfig;
|
|
5
5
|
exports.getLessLoaderConfig = getLessLoaderConfig;
|
|
6
6
|
exports.getStyleLoaders = getStyleLoaders;
|
|
7
|
+
exports.getStylesEntry = getStylesEntry;
|
|
8
|
+
const core_1 = require("@rspack/core");
|
|
7
9
|
function getIncludePathOptions(includePaths) {
|
|
8
10
|
if (!includePaths || includePaths.length === 0) {
|
|
9
11
|
return { less: {}, sass: {} };
|
|
@@ -17,24 +19,48 @@ function getSassLoaderConfig(sassPathOptions, sassOptions, sourceMap) {
|
|
|
17
19
|
return {
|
|
18
20
|
test: /\.?(sa|sc)ss$/,
|
|
19
21
|
use: [
|
|
22
|
+
core_1.CssExtractRspackPlugin.loader,
|
|
23
|
+
{
|
|
24
|
+
loader: require.resolve('css-loader'),
|
|
25
|
+
options: {
|
|
26
|
+
url: false,
|
|
27
|
+
sourceMap: sourceMap?.styles,
|
|
28
|
+
importLoaders: 1,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
loader: require.resolve('resolve-url-loader'),
|
|
33
|
+
options: {
|
|
34
|
+
sourceMap: sourceMap?.styles,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
20
37
|
{
|
|
21
38
|
loader: 'sass-loader',
|
|
22
39
|
options: {
|
|
23
40
|
api: 'modern-compiler',
|
|
24
41
|
sourceMap: sourceMap?.styles,
|
|
42
|
+
sourceMapIncludeSources: true,
|
|
25
43
|
implementation: require.resolve('sass-embedded'),
|
|
26
44
|
...(sassPathOptions ?? []),
|
|
27
45
|
...(sassOptions ?? {}),
|
|
28
46
|
},
|
|
29
47
|
},
|
|
30
48
|
],
|
|
31
|
-
type: 'css/auto',
|
|
32
49
|
};
|
|
33
50
|
}
|
|
34
51
|
function getLessLoaderConfig(lessPathOptions, sourceMap) {
|
|
35
52
|
return {
|
|
36
53
|
test: /\.less$/,
|
|
37
54
|
use: [
|
|
55
|
+
core_1.CssExtractRspackPlugin.loader,
|
|
56
|
+
{
|
|
57
|
+
loader: require.resolve('css-loader'),
|
|
58
|
+
options: {
|
|
59
|
+
url: false,
|
|
60
|
+
sourceMap: sourceMap?.styles,
|
|
61
|
+
importLoaders: 1,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
38
64
|
{
|
|
39
65
|
loader: 'less-loader',
|
|
40
66
|
options: {
|
|
@@ -44,7 +70,6 @@ function getLessLoaderConfig(lessPathOptions, sourceMap) {
|
|
|
44
70
|
},
|
|
45
71
|
},
|
|
46
72
|
],
|
|
47
|
-
type: 'css/auto',
|
|
48
73
|
};
|
|
49
74
|
}
|
|
50
75
|
/**
|
|
@@ -56,7 +81,31 @@ function getLessLoaderConfig(lessPathOptions, sourceMap) {
|
|
|
56
81
|
function getStyleLoaders(stylePreprocessorOptions, sourceMap) {
|
|
57
82
|
const { less: lessPathOptions, sass: sassPathOptions } = getIncludePathOptions(stylePreprocessorOptions?.includePaths);
|
|
58
83
|
return [
|
|
84
|
+
{
|
|
85
|
+
test: /\.css$/i,
|
|
86
|
+
use: [
|
|
87
|
+
core_1.CssExtractRspackPlugin.loader,
|
|
88
|
+
{
|
|
89
|
+
loader: require.resolve('css-loader'),
|
|
90
|
+
options: {
|
|
91
|
+
url: false,
|
|
92
|
+
sourceMap: sourceMap?.styles,
|
|
93
|
+
importLoaders: 1,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
59
98
|
getSassLoaderConfig(sassPathOptions, stylePreprocessorOptions?.sass, sourceMap),
|
|
60
99
|
getLessLoaderConfig(lessPathOptions, sourceMap),
|
|
61
100
|
];
|
|
62
101
|
}
|
|
102
|
+
function getStylesEntry(options) {
|
|
103
|
+
const styles = options.globalStyles ?? [];
|
|
104
|
+
const allStyleEntries = [];
|
|
105
|
+
for (const style of styles) {
|
|
106
|
+
for (const file of style.files) {
|
|
107
|
+
allStyleEntries.push(file);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return allStyleEntries;
|
|
111
|
+
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import type { FileReplacement, InlineStyleLanguage, StylePreprocessorOptions } from '@nx/angular-rspack-compiler';
|
|
2
2
|
import type { DevServerUnsupportedOptions, PluginUnsupportedOptions } from './unsupported-options';
|
|
3
3
|
export interface DevServerOptions extends DevServerUnsupportedOptions {
|
|
4
|
+
host?: string;
|
|
4
5
|
port?: number;
|
|
6
|
+
proxyConfig?: string;
|
|
5
7
|
ssl?: boolean;
|
|
6
|
-
sslKey?: string;
|
|
7
8
|
sslCert?: string;
|
|
8
|
-
|
|
9
|
+
sslKey?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface NormalizedDevServerOptions extends DevServerOptions {
|
|
12
|
+
host: string;
|
|
13
|
+
port: number;
|
|
9
14
|
}
|
|
10
15
|
export interface OptimizationOptions {
|
|
16
|
+
fonts?: boolean;
|
|
11
17
|
scripts?: boolean;
|
|
12
18
|
styles?: boolean;
|
|
13
|
-
fonts?: boolean;
|
|
14
19
|
}
|
|
15
20
|
export type OutputHashing = 'none' | 'all' | 'media' | 'bundles';
|
|
16
21
|
export type HashFormat = {
|
|
@@ -22,8 +27,8 @@ export type HashFormat = {
|
|
|
22
27
|
export interface OutputPath {
|
|
23
28
|
base: string;
|
|
24
29
|
browser: string;
|
|
25
|
-
server: string;
|
|
26
30
|
media: string;
|
|
31
|
+
server: string;
|
|
27
32
|
}
|
|
28
33
|
export type AssetExpandedDefinition = {
|
|
29
34
|
glob: string;
|
|
@@ -41,9 +46,9 @@ export type ScriptOrStyleEntry = string | {
|
|
|
41
46
|
inject?: boolean;
|
|
42
47
|
};
|
|
43
48
|
export type GlobalEntry = {
|
|
44
|
-
name: string;
|
|
45
49
|
files: string[];
|
|
46
50
|
initial: boolean;
|
|
51
|
+
name: string;
|
|
47
52
|
};
|
|
48
53
|
export type IndexExpandedDefinition = {
|
|
49
54
|
input: string;
|
|
@@ -98,9 +103,7 @@ export interface NormalizedAngularRspackPluginOptions extends Omit<AngularRspack
|
|
|
98
103
|
assets: NormalizedAssetElement[];
|
|
99
104
|
browser: string;
|
|
100
105
|
commonChunk: boolean;
|
|
101
|
-
devServer:
|
|
102
|
-
port: number;
|
|
103
|
-
};
|
|
106
|
+
devServer: NormalizedDevServerOptions;
|
|
104
107
|
extractLicenses: boolean;
|
|
105
108
|
fileReplacements: FileReplacement[];
|
|
106
109
|
globalScripts: GlobalEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-rspack-plugin-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/angular-rspack-plugin-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,gBAAiB,SAAQ,2BAA2B;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"angular-rspack-plugin-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/angular-rspack-plugin-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O,CAAC;IAC/B,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,0BAA0B,CAAC;IACtC,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,KAAK,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC1C,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,GAAG,mBAAmB,CAAC;IAC5C,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -3,7 +3,7 @@ import type { JavaScriptTransformer } from '@nx/angular-rspack-compiler';
|
|
|
3
3
|
export declare const NG_RSPACK_SYMBOL_NAME = "NG_RSPACK_BUILD";
|
|
4
4
|
export type NG_RSPACK_COMPILATION_STATE = {
|
|
5
5
|
javascriptTransformer: JavaScriptTransformer;
|
|
6
|
-
typescriptFileCache: Map<string, string>;
|
|
6
|
+
typescriptFileCache: Map<string, string | Buffer>;
|
|
7
7
|
};
|
|
8
8
|
export type NgRspackCompilation = Compilation & {
|
|
9
9
|
[NG_RSPACK_SYMBOL_NAME]: () => NG_RSPACK_COMPILATION_STATE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"augmented-compilation.d.ts","sourceRoot":"","sources":["../../../src/lib/models/augmented-compilation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,MAAM,MAAM,2BAA2B,GAAG;IACxC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"augmented-compilation.d.ts","sourceRoot":"","sources":["../../../src/lib/models/augmented-compilation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,MAAM,MAAM,2BAA2B,GAAG;IACxC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CACnD,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG;IAC9C,CAAC,qBAAqB,CAAC,EAAE,MAAM,2BAA2B,CAAC;CAC5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../src/lib/models/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAkB9D,OAAO,KAAK,EACV,0BAA0B,EAI1B,oCAAoC,EAOrC,MAAM,iCAAiC,CAAC;AAMzC,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,eAAe,EAAE,EACnC,IAAI,EAAE,MAAM,GACX,eAAe,EAAE,CAKnB;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,EAAE,0BAA0B,CAAC,KAAK,CAAC,GACrC,OAAO,CAQT;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,0BAA0B,CAAC,KAAK,CAAC,QAmBjE;AAED,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,0BAA0B,CAAC,cAAc,CAAC,QASzD;AA0BD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,0BAA0B,GAClC,oCAAoC,CA0ItC"}
|
|
@@ -205,12 +205,14 @@ function normalizeSourceMap(sourceMap) {
|
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
function normalizeDevServer(devServer) {
|
|
208
|
+
const defaultHost = 'localhost';
|
|
208
209
|
const defaultPort = 4200;
|
|
209
210
|
if (!devServer) {
|
|
210
|
-
return { port: defaultPort };
|
|
211
|
+
return { host: defaultHost, port: defaultPort };
|
|
211
212
|
}
|
|
212
213
|
return {
|
|
213
214
|
...devServer,
|
|
215
|
+
host: devServer.host ?? defaultHost,
|
|
214
216
|
port: devServer.port ?? defaultPort,
|
|
215
217
|
};
|
|
216
218
|
}
|
|
@@ -263,8 +265,9 @@ function normalizeAssetPatterns(assets, root, projectRoot, projectSourceRoot) {
|
|
|
263
265
|
return [];
|
|
264
266
|
}
|
|
265
267
|
// When sourceRoot is not available, we default to ${projectRoot}/src.
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
+
const resolvedSourceRoot = projectSourceRoot
|
|
269
|
+
? (0, node_path_1.join)(devkit_1.workspaceRoot, projectSourceRoot)
|
|
270
|
+
: (0, node_path_1.join)(devkit_1.workspaceRoot, projectRoot, 'src');
|
|
268
271
|
return assets.map((assetPattern) => {
|
|
269
272
|
// Normalize string asset patterns to objects.
|
|
270
273
|
if (typeof assetPattern === 'string') {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { LoaderContext } from '@rspack/core';
|
|
2
|
-
|
|
2
|
+
import { StyleUrlsResolver, TemplateUrlsResolver } from '@nx/angular-rspack-compiler';
|
|
3
|
+
export default function loader(this: LoaderContext<unknown>, content: string, opt?: {
|
|
4
|
+
styleUrlsResolver: StyleUrlsResolver;
|
|
5
|
+
templateUrlsResolver: TemplateUrlsResolver;
|
|
6
|
+
}): void;
|
|
3
7
|
//# sourceMappingURL=angular-transform.loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-transform.loader.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/loaders/angular-transform.loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"angular-transform.loader.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/loaders/angular-transform.loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAKrC,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,EAC5B,OAAO,EAAE,MAAM,EACf,GAAG,CAAC,EAAE;IACJ,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C,QA0CF"}
|
|
@@ -4,9 +4,10 @@ exports.default = loader;
|
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
const angular_rspack_compiler_1 = require("@nx/angular-rspack-compiler");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
function loader(content) {
|
|
7
|
+
const _styleUrlsResolver = new angular_rspack_compiler_1.StyleUrlsResolver();
|
|
8
|
+
const _templateUrlsResolver = new angular_rspack_compiler_1.TemplateUrlsResolver();
|
|
9
|
+
function loader(content, opt) {
|
|
10
|
+
const { styleUrlsResolver = _styleUrlsResolver, templateUrlsResolver = _templateUrlsResolver, } = opt ?? {};
|
|
10
11
|
const callback = this.async();
|
|
11
12
|
if (this._compilation[models_1.NG_RSPACK_SYMBOL_NAME] ===
|
|
12
13
|
undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-rspack.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/ng-rspack.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMR,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAItB,OAAO,EAAE,oCAAoC,EAAc,MAAM,WAAW,CAAC;AAG7E,qBAAa,cAAe,YAAW,oBAAoB;IACzD,aAAa,EAAE,oCAAoC,CAAC;gBAExC,OAAO,EAAE,oCAAoC;IAIzD,KAAK,CAAC,QAAQ,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"ng-rspack.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/ng-rspack.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMR,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAItB,OAAO,EAAE,oCAAoC,EAAc,MAAM,WAAW,CAAC;AAG7E,qBAAa,cAAe,YAAW,oBAAoB;IACzD,aAAa,EAAE,oCAAoC,CAAC;gBAExC,OAAO,EAAE,oCAAoC;IAIzD,KAAK,CAAC,QAAQ,EAAE,QAAQ;CA4GzB"}
|
|
@@ -20,21 +20,15 @@ class NgRspackPlugin {
|
|
|
20
20
|
compiler.hooks.entryOption.tap('NgRspackPlugin', (context, entry) => {
|
|
21
21
|
const keys = Object.keys(entry);
|
|
22
22
|
for (const key of keys) {
|
|
23
|
+
if (key === 'styles') {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
23
26
|
const entryValue = entry[key];
|
|
24
27
|
entryValue.import = [...polyfills, ...entryValue.import];
|
|
25
28
|
}
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
31
|
if (!this.pluginOptions.hasServer) {
|
|
29
|
-
// @TODO: properly handle global styles and scripts
|
|
30
|
-
const styles = this.pluginOptions.globalStyles ?? [];
|
|
31
|
-
for (const style of styles) {
|
|
32
|
-
for (const file of style.files) {
|
|
33
|
-
new core_1.EntryPlugin(compiler.context, file, {
|
|
34
|
-
name: isProduction ? style.name : undefined,
|
|
35
|
-
}).apply(compiler);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
32
|
const scripts = this.pluginOptions.globalScripts ?? [];
|
|
39
33
|
for (const script of scripts) {
|
|
40
34
|
for (const file of script.files) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular-rspack",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.6.0-beta.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -46,17 +46,18 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@nx/devkit": "^20.0.0",
|
|
48
48
|
"express": "4.21.1",
|
|
49
|
-
"
|
|
49
|
+
"css-loader": "^7.1.2",
|
|
50
50
|
"jsonc-parser": "^3.3.1",
|
|
51
51
|
"less-loader": "^12.2.0",
|
|
52
52
|
"license-webpack-plugin": "^4.0.2",
|
|
53
|
+
"resolve-url-loader": "^5.0.0",
|
|
53
54
|
"sass-embedded": "^1.79.3",
|
|
54
55
|
"sass-loader": "^16.0.2",
|
|
55
|
-
"
|
|
56
|
+
"source-map-loader": "^5.0.0",
|
|
56
57
|
"tslib": "^2.3.0",
|
|
57
58
|
"webpack-merge": "^6.0.1",
|
|
58
59
|
"ws": "^8.18.0",
|
|
59
|
-
"@nx/angular-rspack-compiler": "20.
|
|
60
|
+
"@nx/angular-rspack-compiler": "20.6.0-beta.0"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@ng-rspack/testing-setup": "0.0.1"
|