@nx/rspack 20.0.1 → 20.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/README.md CHANGED
@@ -66,52 +66,3 @@ npx nx@latest init
66
66
  <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
67
67
  width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
68
68
 
69
-
70
- <p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
71
-
72
- <hr>
73
-
74
- # Nx: Smart, Fast and Extensible Build System
75
-
76
- Nx is a next generation build system with first class monorepo support and powerful integrations.
77
-
78
- This package is a Rspack plugin for Nx.
79
-
80
- ## Getting Started
81
-
82
- Use `--preset=@nx/rspack` when creating new workspace.
83
-
84
- e.g.
85
-
86
- ```bash
87
- npx create-nx-workspace@latest rspack-demo --preset=@nx/rspack
88
- ```
89
-
90
- Now, you can go into the `rspack-demo` folder and start development.
91
-
92
- ```bash
93
- cd rspack-demo
94
- npm start
95
- ```
96
-
97
- You can also run lint, test, and e2e scripts for the project.
98
-
99
- ```bash
100
- npm run lint
101
- npm run test
102
- npm run e2e
103
- ```
104
-
105
- ## Existing workspaces
106
-
107
- You can add Rspack to any existing Nx workspace.
108
-
109
- First, install the plugin:
110
-
111
- ```bash
112
- npm install --save-dev @nx/rspack
113
- ```
114
-
115
- Then, r
116
-
117
- **Note:** You must restart the server if you make any changes to your library.
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": "20.0.1",
4
+ "version": "20.0.2",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,19 +24,25 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/js": "20.0.1",
28
- "@nx/devkit": "20.0.1",
29
- "@nx/eslint": "20.0.1",
27
+ "@nx/js": "20.0.2",
28
+ "@nx/devkit": "20.0.2",
29
+ "@nx/web": "20.0.2",
30
30
  "@phenomnomnominal/tsquery": "~5.0.1",
31
+ "enquirer": "~2.3.6",
32
+ "express": "^4.19.2",
33
+ "http-proxy-middleware": "^3.0.0",
31
34
  "less-loader": "11.1.0",
32
35
  "license-webpack-plugin": "^4.0.2",
33
36
  "sass-loader": "^12.2.0",
34
37
  "stylus-loader": "^7.1.0",
35
38
  "postcss-loader": "^8.1.1",
36
39
  "@rspack/core": "^1.0.4",
40
+ "@rspack/dev-server": "^1.0.4",
37
41
  "@rspack/plugin-react-refresh": "^1.0.0",
38
- "@rspack/plugin-minify": "^0.7.5",
39
- "chalk": "~4.1.0"
42
+ "chalk": "~4.1.0",
43
+ "tsconfig-paths": "^4.1.2",
44
+ "tslib": "^2.3.0",
45
+ "webpack-sources": "^3.2.3"
40
46
  },
41
47
  "peerDependencies": {
42
48
  "@module-federation/enhanced": "~0.6.0",
@@ -24,9 +24,8 @@ async function* runExecutor(options, context) {
24
24
  devServerConfig = {
25
25
  ...devServerConfig,
26
26
  ...firstCompiler.options.devServer,
27
- port: devServerConfig.port,
28
27
  };
29
- const baseUrl = `http://localhost:${options.port ?? 4200}`;
28
+ const baseUrl = `http://localhost:${devServerConfig.port ?? 4200}`;
30
29
  return yield* (0, async_iterable_1.createAsyncIterable)(({ next }) => {
31
30
  const server = new dev_server_1.RspackDevServer({
32
31
  ...devServerConfig,
@@ -23,7 +23,7 @@ reload = false) {
23
23
  const maybeCustomRspackConfig = require(path);
24
24
  cleanupTranspiler();
25
25
  // If the user provides a configuration in TS file
26
- // then there are 3 cases for exporing an object. The first one is:
26
+ // then there are 3 cases for exploring an object. The first one is:
27
27
  // `module.exports = { ... }`. And the second one is:
28
28
  // `export default { ... }`. The ESM format is compiled into:
29
29
  // `{ default: { ... } }`
@@ -97,8 +97,8 @@ function withWeb(opts = {}) {
97
97
  ? path.join(context.root, options.indexHtml)
98
98
  : path.join(projectRoot, 'src/index.html'),
99
99
  }),
100
- new core_1.rspack.DefinePlugin({
101
- 'process.env.NODE_ENV': isProd ? "'production'" : "'development'",
100
+ new core_1.rspack.EnvironmentPlugin({
101
+ NODE_ENV: 'development',
102
102
  }),
103
103
  ],
104
104
  };