@nx/webpack 21.4.0-beta.0 → 21.4.0-beta.10
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/package.json +4 -6
- package/src/executors/webpack/schema.json +2 -2
- package/src/generators/init/init.d.ts.map +1 -1
- package/src/generators/init/init.js +7 -0
- package/src/plugins/nx-webpack-plugin/lib/apply-web-config.d.ts.map +1 -1
- package/src/plugins/nx-webpack-plugin/lib/apply-web-config.js +2 -49
- package/src/utils/webpack/deprecated-stylus-loader.d.ts +0 -2
- package/src/utils/webpack/deprecated-stylus-loader.d.ts.map +0 -1
- package/src/utils/webpack/deprecated-stylus-loader.js +0 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/webpack",
|
|
3
|
-
"version": "21.4.0-beta.
|
|
3
|
+
"version": "21.4.0-beta.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Webpack contains executors and generators that support building applications using Webpack.",
|
|
6
6
|
"repository": {
|
|
@@ -56,8 +56,6 @@
|
|
|
56
56
|
"sass-loader": "^16.0.4",
|
|
57
57
|
"source-map-loader": "^5.0.0",
|
|
58
58
|
"style-loader": "^3.3.0",
|
|
59
|
-
"stylus": "^0.64.0",
|
|
60
|
-
"stylus-loader": "^7.1.0",
|
|
61
59
|
"terser-webpack-plugin": "^5.3.3",
|
|
62
60
|
"ts-loader": "^9.3.1",
|
|
63
61
|
"tsconfig-paths-webpack-plugin": "4.0.0",
|
|
@@ -66,11 +64,11 @@
|
|
|
66
64
|
"webpack-dev-server": "^5.2.1",
|
|
67
65
|
"webpack-node-externals": "^3.0.0",
|
|
68
66
|
"webpack-subresource-integrity": "^5.1.0",
|
|
69
|
-
"@nx/devkit": "21.4.0-beta.
|
|
70
|
-
"@nx/js": "21.4.0-beta.
|
|
67
|
+
"@nx/devkit": "21.4.0-beta.10",
|
|
68
|
+
"@nx/js": "21.4.0-beta.10"
|
|
71
69
|
},
|
|
72
70
|
"devDependencies": {
|
|
73
|
-
"nx": "21.4.0-beta.
|
|
71
|
+
"nx": "21.4.0-beta.10"
|
|
74
72
|
},
|
|
75
73
|
"publishConfig": {
|
|
76
74
|
"access": "public"
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
"type": "string",
|
|
371
371
|
"description": "The file to include.",
|
|
372
372
|
"x-completion-type": "file",
|
|
373
|
-
"x-completion-glob": "**/*@(.css|.scss|.less|.sass
|
|
373
|
+
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
|
374
374
|
},
|
|
375
375
|
"bundleName": {
|
|
376
376
|
"type": "string",
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
"type": "string",
|
|
390
390
|
"description": "The file to include.",
|
|
391
391
|
"x-completion-type": "file",
|
|
392
|
-
"x-completion-glob": "**/*@(.css|.scss|.less|.sass
|
|
392
|
+
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
|
393
393
|
}
|
|
394
394
|
]
|
|
395
395
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAE9D;AAED,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAE9D;AAED,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAkF5E;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -47,6 +47,13 @@ async function webpackInitGeneratorInternal(tree, schema) {
|
|
|
47
47
|
'webpack:watch-deps',
|
|
48
48
|
'webpack-watch-deps',
|
|
49
49
|
],
|
|
50
|
+
serveStaticTargetName: [
|
|
51
|
+
'serve-static',
|
|
52
|
+
'webpack:serve-static',
|
|
53
|
+
'serve-static:webpack',
|
|
54
|
+
'webpack-serve-static',
|
|
55
|
+
'serve-static-webpack',
|
|
56
|
+
],
|
|
50
57
|
}, schema.updatePackageScripts);
|
|
51
58
|
}
|
|
52
59
|
let installTask = () => { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-web-config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/webpack/src/plugins/nx-webpack-plugin/lib/apply-web-config.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EAIb,wBAAwB,EAEzB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AAavF,wBAAgB,cAAc,CAC5B,OAAO,EAAE,mCAAmC,EAC5C,MAAM,GAAE,OAAO,CAAC,wBAAwB,GAAG,aAAa,CAAM,EAC9D,EACE,kBAAkB,GACnB,GAAE;IAID,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACzB,GACL,IAAI,
|
|
1
|
+
{"version":3,"file":"apply-web-config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/webpack/src/plugins/nx-webpack-plugin/lib/apply-web-config.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EAIb,wBAAwB,EAEzB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AAavF,wBAAgB,cAAc,CAC5B,OAAO,EAAE,mCAAmC,EAC5C,MAAM,GAAE,OAAO,CAAC,wBAAwB,GAAG,aAAa,CAAM,EAC9D,EACE,kBAAkB,GACnB,GAAE;IAID,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACzB,GACL,IAAI,CAsWN"}
|
|
@@ -46,7 +46,7 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
46
46
|
const minimizer = [new webpack_1.ids.HashedModuleIdsPlugin()];
|
|
47
47
|
if (stylesOptimization) {
|
|
48
48
|
minimizer.push(new CssMinimizerPlugin({
|
|
49
|
-
test: /\.(?:css|scss|sass|less
|
|
49
|
+
test: /\.(?:css|scss|sass|less)$/,
|
|
50
50
|
}));
|
|
51
51
|
}
|
|
52
52
|
if (!options.ssr) {
|
|
@@ -129,21 +129,6 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
129
129
|
},
|
|
130
130
|
],
|
|
131
131
|
},
|
|
132
|
-
{
|
|
133
|
-
test: /\.module\.styl$/,
|
|
134
|
-
exclude: globalStylePaths,
|
|
135
|
-
use: [
|
|
136
|
-
...(0, stylesheet_loaders_1.getCommonLoadersForCssModules)(options, includePaths),
|
|
137
|
-
{
|
|
138
|
-
loader: path.join(__dirname, '../../../utils/webpack/deprecated-stylus-loader.js'),
|
|
139
|
-
options: {
|
|
140
|
-
stylusOptions: {
|
|
141
|
-
include: includePaths,
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
132
|
];
|
|
148
133
|
const globalCssRules = [
|
|
149
134
|
{
|
|
@@ -193,22 +178,6 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
193
178
|
},
|
|
194
179
|
],
|
|
195
180
|
},
|
|
196
|
-
{
|
|
197
|
-
test: /\.styl$/,
|
|
198
|
-
exclude: globalStylePaths,
|
|
199
|
-
use: [
|
|
200
|
-
...(0, stylesheet_loaders_1.getCommonLoadersForGlobalCss)(options, includePaths),
|
|
201
|
-
{
|
|
202
|
-
loader: path.join(__dirname, '../../../utils/webpack/deprecated-stylus-loader.js'),
|
|
203
|
-
options: {
|
|
204
|
-
sourceMap: !!options.sourceMap,
|
|
205
|
-
stylusOptions: {
|
|
206
|
-
include: includePaths,
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
],
|
|
211
|
-
},
|
|
212
181
|
];
|
|
213
182
|
const globalStyleRules = [
|
|
214
183
|
{
|
|
@@ -258,26 +227,10 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
258
227
|
},
|
|
259
228
|
],
|
|
260
229
|
},
|
|
261
|
-
{
|
|
262
|
-
test: /\.styl$/,
|
|
263
|
-
include: globalStylePaths,
|
|
264
|
-
use: [
|
|
265
|
-
...(0, stylesheet_loaders_1.getCommonLoadersForGlobalStyle)(options, includePaths),
|
|
266
|
-
{
|
|
267
|
-
loader: path.join(__dirname, '../../../utils/webpack/deprecated-stylus-loader.js'),
|
|
268
|
-
options: {
|
|
269
|
-
sourceMap: !!options.sourceMap,
|
|
270
|
-
stylusOptions: {
|
|
271
|
-
include: includePaths,
|
|
272
|
-
},
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
],
|
|
276
|
-
},
|
|
277
230
|
];
|
|
278
231
|
const rules = [
|
|
279
232
|
{
|
|
280
|
-
test: /\.css$|\.scss$|\.sass$|\.less
|
|
233
|
+
test: /\.css$|\.scss$|\.sass$|\.less$/,
|
|
281
234
|
oneOf: [...cssModuleRules, ...globalCssRules, ...globalStyleRules],
|
|
282
235
|
},
|
|
283
236
|
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated-stylus-loader.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/utils/webpack/deprecated-stylus-loader.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,GAAG,MAAM,CAK/C"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = default_1;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
const stylusLoader = require("stylus-loader");
|
|
7
|
-
// TOOD(v19): Remove this file and stylus support.
|
|
8
|
-
function default_1(source) {
|
|
9
|
-
devkit_1.logger.warn(`Stylus is support is deprecated and will be removed in Nx 20. We recommend that you migrate to Sass by renaming \`.styl\` files to \`.scss\` and ensuring that the content is valid Sass.`);
|
|
10
|
-
return stylusLoader.call(this, source);
|
|
11
|
-
}
|