create-rspack 1.0.0-rc.0 → 1.0.0-rc.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.
Files changed (2) hide show
  1. package/index.js +9 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -89,6 +89,13 @@ function copyFolder(src, dst, targetDir) {
89
89
  _gitignore: ".gitignore"
90
90
  };
91
91
 
92
+ // replace workspace packages with version in package.json
93
+ const workspacePackages = [
94
+ "@rspack/cli",
95
+ "@rspack/core",
96
+ "@rspack/dev-server"
97
+ ];
98
+
92
99
  fs.mkdirSync(dst, { recursive: true });
93
100
  for (const file of fs.readdirSync(src)) {
94
101
  if (file === "node_modules") {
@@ -107,14 +114,14 @@ function copyFolder(src, dst, targetDir) {
107
114
  const pkg = require(srcFile);
108
115
  if (pkg.dependencies) {
109
116
  for (const key of Object.keys(pkg.dependencies)) {
110
- if (key.startsWith("@rspack/")) {
117
+ if (workspacePackages.includes(key)) {
111
118
  pkg.dependencies[key] = version;
112
119
  }
113
120
  }
114
121
  }
115
122
  if (pkg.devDependencies) {
116
123
  for (const key of Object.keys(pkg.devDependencies)) {
117
- if (key.startsWith("@rspack/")) {
124
+ if (workspacePackages.includes(key)) {
118
125
  pkg.devDependencies[key] = version;
119
126
  }
120
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rspack",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.0-rc.2",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "bin": {