@nx/webpack 17.0.0 → 17.0.2
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/webpack",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.2",
|
|
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": {
|
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
"sass-loader": "^12.2.0",
|
|
53
53
|
"source-map-loader": "^3.0.0",
|
|
54
54
|
"style-loader": "^3.3.0",
|
|
55
|
+
"stylus": "^0.59.0",
|
|
56
|
+
"stylus-loader": "^7.1.0",
|
|
55
57
|
"terser-webpack-plugin": "^5.3.3",
|
|
56
58
|
"ts-loader": "^9.3.1",
|
|
57
59
|
"tsconfig-paths-webpack-plugin": "4.0.0",
|
|
@@ -60,9 +62,9 @@
|
|
|
60
62
|
"webpack-dev-server": "^4.9.3",
|
|
61
63
|
"webpack-node-externals": "^3.0.0",
|
|
62
64
|
"webpack-subresource-integrity": "^5.1.0",
|
|
63
|
-
"@nx/devkit": "17.0.
|
|
64
|
-
"@nx/js": "17.0.
|
|
65
|
-
"@nrwl/webpack": "17.0.
|
|
65
|
+
"@nx/devkit": "17.0.2",
|
|
66
|
+
"@nx/js": "17.0.2",
|
|
67
|
+
"@nrwl/webpack": "17.0.2"
|
|
66
68
|
},
|
|
67
69
|
"publishConfig": {
|
|
68
70
|
"access": "public"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (source: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
const stylusLoader = require("stylus-loader");
|
|
6
|
+
// TOOD(v18): Remove this file and stylus support.
|
|
7
|
+
function default_1(source) {
|
|
8
|
+
devkit_1.logger.warn(`Stylus is support is deprecated and will be removed in Nx 18. We recommend that you migrate to Sass by renaming \`.styl\` files to \`.scss\` and ensuring that the content is valid Sass.`);
|
|
9
|
+
return stylusLoader.call(this, source);
|
|
10
|
+
}
|
|
11
|
+
exports.default = default_1;
|
package/src/utils/with-web.js
CHANGED
|
@@ -57,7 +57,7 @@ function withWeb(pluginOptions = {}) {
|
|
|
57
57
|
];
|
|
58
58
|
if (stylesOptimization) {
|
|
59
59
|
minimizer.push(new CssMinimizerPlugin({
|
|
60
|
-
test: /\.(?:css|scss|sass|less)$/,
|
|
60
|
+
test: /\.(?:css|scss|sass|less|styl)$/,
|
|
61
61
|
}));
|
|
62
62
|
}
|
|
63
63
|
if (!pluginOptions.ssr) {
|
|
@@ -131,6 +131,21 @@ function withWeb(pluginOptions = {}) {
|
|
|
131
131
|
},
|
|
132
132
|
],
|
|
133
133
|
},
|
|
134
|
+
{
|
|
135
|
+
test: /\.module\.styl$/,
|
|
136
|
+
exclude: globalStylePaths,
|
|
137
|
+
use: [
|
|
138
|
+
...getCommonLoadersForCssModules(mergedOptions, includePaths),
|
|
139
|
+
{
|
|
140
|
+
loader: (0, path_1.join)(__dirname, 'webpack/deprecated-stylus-loader.js'),
|
|
141
|
+
options: {
|
|
142
|
+
stylusOptions: {
|
|
143
|
+
include: includePaths,
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
},
|
|
134
149
|
];
|
|
135
150
|
const globalCssRules = [
|
|
136
151
|
{
|
|
@@ -175,6 +190,22 @@ function withWeb(pluginOptions = {}) {
|
|
|
175
190
|
},
|
|
176
191
|
],
|
|
177
192
|
},
|
|
193
|
+
{
|
|
194
|
+
test: /\.styl$/,
|
|
195
|
+
exclude: globalStylePaths,
|
|
196
|
+
use: [
|
|
197
|
+
...getCommonLoadersForGlobalCss(mergedOptions, includePaths),
|
|
198
|
+
{
|
|
199
|
+
loader: (0, path_1.join)(__dirname, 'webpack/deprecated-stylus-loader.js'),
|
|
200
|
+
options: {
|
|
201
|
+
sourceMap: !!mergedOptions.sourceMap,
|
|
202
|
+
stylusOptions: {
|
|
203
|
+
include: includePaths,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
},
|
|
178
209
|
];
|
|
179
210
|
const globalStyleRules = [
|
|
180
211
|
{
|
|
@@ -219,10 +250,26 @@ function withWeb(pluginOptions = {}) {
|
|
|
219
250
|
},
|
|
220
251
|
],
|
|
221
252
|
},
|
|
253
|
+
{
|
|
254
|
+
test: /\.styl$/,
|
|
255
|
+
include: globalStylePaths,
|
|
256
|
+
use: [
|
|
257
|
+
...getCommonLoadersForGlobalStyle(mergedOptions, includePaths),
|
|
258
|
+
{
|
|
259
|
+
loader: require.resolve('stylus-loader'),
|
|
260
|
+
options: {
|
|
261
|
+
sourceMap: !!mergedOptions.sourceMap,
|
|
262
|
+
stylusOptions: {
|
|
263
|
+
include: includePaths,
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
],
|
|
268
|
+
},
|
|
222
269
|
];
|
|
223
270
|
const rules = [
|
|
224
271
|
{
|
|
225
|
-
test: /\.css$|\.scss$|\.sass$|\.less$/,
|
|
272
|
+
test: /\.css$|\.scss$|\.sass$|\.less$|\.styl$/,
|
|
226
273
|
oneOf: [...cssModuleRules, ...globalCssRules, ...globalStyleRules],
|
|
227
274
|
},
|
|
228
275
|
];
|