@nx/rspack 21.4.0-beta.0 → 21.4.0-beta.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,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/rspack",
3
3
  "description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
4
- "version": "21.4.0-beta.0",
4
+ "version": "21.4.0-beta.2",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/js": "21.4.0-beta.0",
28
- "@nx/devkit": "21.4.0-beta.0",
29
- "@nx/web": "21.4.0-beta.0",
30
- "@nx/module-federation": "21.4.0-beta.0",
27
+ "@nx/js": "21.4.0-beta.2",
28
+ "@nx/devkit": "21.4.0-beta.2",
29
+ "@nx/web": "21.4.0-beta.2",
30
+ "@nx/module-federation": "21.4.0-beta.2",
31
31
  "@phenomnomnominal/tsquery": "~5.0.1",
32
32
  "@rspack/core": "^1.3.8",
33
33
  "@rspack/dev-server": "^1.1.1",
@@ -57,7 +57,7 @@
57
57
  "webpack-node-externals": "^3.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "nx": "21.4.0-beta.0"
60
+ "nx": "21.4.0-beta.2"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@module-federation/enhanced": "^0.17.0",
@@ -332,7 +332,7 @@
332
332
  "type": "string",
333
333
  "description": "The file to include.",
334
334
  "x-completion-type": "file",
335
- "x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
335
+ "x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
336
336
  },
337
337
  "bundleName": {
338
338
  "type": "string",
@@ -351,7 +351,7 @@
351
351
  "type": "string",
352
352
  "description": "The file to include.",
353
353
  "x-completion-type": "file",
354
- "x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
354
+ "x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
355
355
  }
356
356
  ]
357
357
  },
@@ -2,7 +2,7 @@ export interface ApplicationGeneratorSchema {
2
2
  directory: string;
3
3
  name?: string;
4
4
  framework?: Framework;
5
- style: 'css' | 'scss' | 'less' | 'styl';
5
+ style: 'css' | 'scss' | 'less';
6
6
  unitTestRunner?: 'none' | 'jest';
7
7
  e2eTestRunner?: 'none' | 'cypress';
8
8
  tags?: string;
@@ -24,7 +24,7 @@
24
24
  "name": {
25
25
  "description": "The name of the application.",
26
26
  "type": "string",
27
- "pattern": "^[a-zA-Z].*$"
27
+ "pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$"
28
28
  },
29
29
  "framework": {
30
30
  "type": "string",
@@ -52,10 +52,6 @@
52
52
  "value": "scss",
53
53
  "label": "SASS(.scss) [ http://sass-lang.com ]"
54
54
  },
55
- {
56
- "value": "styl",
57
- "label": "Stylus(.styl) [ http://stylus-lang.com ]"
58
- },
59
55
  {
60
56
  "value": "less",
61
57
  "label": "LESS [ http://lesscss.org ]"
@@ -6,6 +6,6 @@ export interface InitGeneratorSchema {
6
6
  framework?: Framework;
7
7
  keepExistingVersions?: boolean;
8
8
  rootProject?: boolean;
9
- style?: 'none' | 'css' | 'scss' | 'less' | 'styl';
9
+ style?: 'none' | 'css' | 'scss' | 'less';
10
10
  updatePackageScripts?: boolean;
11
11
  }
@@ -14,7 +14,7 @@
14
14
  "style": {
15
15
  "type": "string",
16
16
  "description": "The style solution to use.",
17
- "enum": ["none", "css", "scss", "less", "styl"]
17
+ "enum": ["none", "css", "scss", "less"]
18
18
  },
19
19
  "rootProject": {
20
20
  "type": "boolean",
@@ -1 +1 @@
1
- {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/generators/preset/preset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,yBAA+B,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,qBAAqB,mDA+BxE"}
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/generators/preset/preset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,yBAA+B,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,qBAAqB,mDAyBxE"}
@@ -9,13 +9,7 @@ async function default_1(tree, options) {
9
9
  ...options,
10
10
  directory: '.',
11
11
  // Since `--style` is not passed down to custom preset, we're using individual flags for now.
12
- style: options.sass
13
- ? 'scss'
14
- : options.less
15
- ? 'less'
16
- : options.stylus
17
- ? 'styl'
18
- : 'css',
12
+ style: options.sass ? 'scss' : options.less ? 'less' : 'css',
19
13
  });
20
14
  (0, devkit_1.updateJson)(tree, 'package.json', (json) => {
21
15
  json.scripts ??= {};
@@ -3,7 +3,6 @@ export interface PresetGeneratorSchema {
3
3
  framework?: Framework;
4
4
  less?: boolean;
5
5
  sass?: boolean;
6
- stylus?: boolean;
7
6
  unitTestRunner?: 'none' | 'jest';
8
7
  e2eTestRunner?: 'none' | 'cypress';
9
8
  directory?: string;
@@ -30,10 +30,6 @@
30
30
  "type": "boolean",
31
31
  "description": "Use sass for styling."
32
32
  },
33
- "stylus": {
34
- "type": "boolean",
35
- "description": "Use stylus for styling."
36
- },
37
33
  "unitTestRunner": {
38
34
  "type": "string",
39
35
  "description": "The unit test runner to use.",
@@ -1 +1 @@
1
- {"version":3,"file":"apply-web-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/plugins/utils/apply-web-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAQlB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAUtB,OAAO,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAG9D,wBAAgB,cAAc,CAC5B,OAAO,EAAE,kCAAkC,EAC3C,MAAM,GAAE,OAAO,CAAC,uBAAuB,GAAG,aAAa,CAAM,EAC7D,EACE,kBAAkB,GACnB,GAAE;IAID,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACzB,GACL,IAAI,CAibN"}
1
+ {"version":3,"file":"apply-web-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/plugins/utils/apply-web-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAQlB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAUtB,OAAO,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAG9D,wBAAgB,cAAc,CAC5B,OAAO,EAAE,kCAAkC,EAC3C,MAAM,GAAE,OAAO,CAAC,uBAAuB,GAAG,aAAa,CAAM,EAC7D,EACE,kBAAkB,GACnB,GAAE;IAID,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACzB,GACL,IAAI,CAyXN"}
@@ -59,7 +59,7 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
59
59
  const minimizer = [];
60
60
  if (isProd && stylesOptimization) {
61
61
  minimizer.push(new core_1.LightningCssMinimizerRspackPlugin({
62
- test: /\.(?:css|scss|sass|less|styl)$/,
62
+ test: /\.(?:css|scss|sass|less)$/,
63
63
  }));
64
64
  }
65
65
  if (!options.ssr) {
@@ -135,21 +135,6 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
135
135
  },
136
136
  ],
137
137
  },
138
- {
139
- test: /\.module\.styl$/,
140
- exclude: globalStylePaths,
141
- use: [
142
- ...(0, stylesheet_loaders_1.getCommonLoadersForCssModules)(options, includePaths),
143
- {
144
- loader: (0, path_1.join)(__dirname, '../../../utils/webpack/deprecated-stylus-loader.js'),
145
- options: {
146
- stylusOptions: {
147
- include: includePaths,
148
- },
149
- },
150
- },
151
- ],
152
- },
153
138
  ];
154
139
  const globalCssRules = [
155
140
  {
@@ -199,22 +184,6 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
199
184
  },
200
185
  ],
201
186
  },
202
- {
203
- test: /\.styl$/,
204
- exclude: globalStylePaths,
205
- use: [
206
- ...(0, stylesheet_loaders_1.getCommonLoadersForGlobalCss)(options, includePaths),
207
- {
208
- loader: (0, path_1.join)(__dirname, '../../../utils/webpack/deprecated-stylus-loader.js'),
209
- options: {
210
- sourceMap: !!options.sourceMap,
211
- stylusOptions: {
212
- include: includePaths,
213
- },
214
- },
215
- },
216
- ],
217
- },
218
187
  ];
219
188
  const globalStyleRules = [
220
189
  {
@@ -264,26 +233,10 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
264
233
  },
265
234
  ],
266
235
  },
267
- {
268
- test: /\.styl$/,
269
- include: globalStylePaths,
270
- use: [
271
- ...(0, stylesheet_loaders_1.getCommonLoadersForGlobalStyle)(options, includePaths),
272
- {
273
- loader: (0, path_1.join)(__dirname, '../../../utils/webpack/deprecated-stylus-loader.js'),
274
- options: {
275
- sourceMap: !!options.sourceMap,
276
- stylusOptions: {
277
- include: includePaths,
278
- },
279
- },
280
- },
281
- ],
282
- },
283
236
  ];
284
237
  const rules = [
285
238
  {
286
- test: /\.css$|\.scss$|\.sass$|\.less$|\.styl$/,
239
+ test: /\.css$|\.scss$|\.sass$|\.less$/,
287
240
  oneOf: [...cssModuleRules, ...globalCssRules, ...globalStyleRules],
288
241
  },
289
242
  ];