create-rspack 1.6.0-beta.0 → 1.6.0
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 +3 -3
- package/template-common/AGENTS.md +13 -0
- package/template-common/README.md +2 -2
- package/template-react-js/package.json +2 -2
- package/template-react-js/rspack.config.mjs +3 -1
- package/template-react-ts/package.json +2 -2
- package/template-react-ts/rspack.config.ts +3 -3
- package/template-vanilla-js/rspack.config.mjs +3 -1
- package/template-vanilla-ts/rspack.config.ts +4 -4
- package/template-vue-js/rspack.config.mjs +2 -4
- package/template-vue-ts/rspack.config.ts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rspack",
|
|
3
|
-
"version": "1.6.0
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"homepage": "https://rspack.rs",
|
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
6
6
|
"repository": {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"bin.js"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"create-rstack": "1.
|
|
23
|
+
"create-rstack": "1.7.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@rslib/core": "0.
|
|
26
|
+
"@rslib/core": "0.16.1",
|
|
27
27
|
"typescript": "^5.9.3"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
You are an expert in JavaScript, Rspack, and web application development. You write maintainable, performant, and accessible code.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- `npm run dev` - Start the dev server
|
|
8
|
+
- `npm run build` - Build the app for production
|
|
9
|
+
- `npm run preview` - Preview the production build locally
|
|
10
|
+
|
|
11
|
+
## Docs
|
|
12
|
+
|
|
13
|
+
- Rspack: <https://rspack.rs/llms.txt>
|
|
@@ -10,7 +10,7 @@ npm install
|
|
|
10
10
|
|
|
11
11
|
## Get started
|
|
12
12
|
|
|
13
|
-
Start the dev server, and the app will be available at
|
|
13
|
+
Start the dev server, and the app will be available at <http://localhost:8080>.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
npm run dev
|
|
@@ -32,5 +32,5 @@ npm run preview
|
|
|
32
32
|
|
|
33
33
|
To learn more about Rspack, check out the following resources:
|
|
34
34
|
|
|
35
|
-
- [Rspack documentation](https://rspack.
|
|
35
|
+
- [Rspack documentation](https://rspack.rs) - explore Rspack features and APIs.
|
|
36
36
|
- [Rspack GitHub repository](https://github.com/web-infra-dev/rspack) - your feedback and contributions are welcome!
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@rspack/cli": "workspace:*",
|
|
16
16
|
"@rspack/core": "workspace:*",
|
|
17
|
-
"@rspack/plugin-react-refresh": "^1.5.
|
|
17
|
+
"@rspack/plugin-react-refresh": "^1.5.2",
|
|
18
18
|
"@types/react": "^19.1.13",
|
|
19
19
|
"@types/react-dom": "^19.1.9",
|
|
20
|
-
"react-refresh": "^0.
|
|
20
|
+
"react-refresh": "^0.18.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-check
|
|
1
2
|
import { dirname } from "node:path";
|
|
2
3
|
import { fileURLToPath } from "node:url";
|
|
3
4
|
import { defineConfig } from "@rspack/cli";
|
|
@@ -29,6 +30,7 @@ export default defineConfig({
|
|
|
29
30
|
use: [
|
|
30
31
|
{
|
|
31
32
|
loader: "builtin:swc-loader",
|
|
33
|
+
/** @type {import('@rspack/core').SwcLoaderOptions} */
|
|
32
34
|
options: {
|
|
33
35
|
jsc: {
|
|
34
36
|
parser: {
|
|
@@ -55,7 +57,7 @@ export default defineConfig({
|
|
|
55
57
|
template: "./index.html"
|
|
56
58
|
}),
|
|
57
59
|
isDev ? new ReactRefreshRspackPlugin() : null
|
|
58
|
-
]
|
|
60
|
+
],
|
|
59
61
|
optimization: {
|
|
60
62
|
minimizer: [
|
|
61
63
|
new rspack.SwcJsMinimizerRspackPlugin(),
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@rspack/cli": "workspace:*",
|
|
16
16
|
"@rspack/core": "workspace:*",
|
|
17
|
-
"@rspack/plugin-react-refresh": "^1.5.
|
|
17
|
+
"@rspack/plugin-react-refresh": "^1.5.2",
|
|
18
18
|
"@types/react": "^19.1.13",
|
|
19
19
|
"@types/react-dom": "^19.1.9",
|
|
20
|
-
"react-refresh": "^0.
|
|
20
|
+
"react-refresh": "^0.18.0",
|
|
21
21
|
"typescript": "^5.9.3"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineConfig } from "@rspack/cli";
|
|
2
|
-
import { rspack } from "@rspack/core";
|
|
2
|
+
import { rspack, type SwcLoaderOptions } from "@rspack/core";
|
|
3
3
|
import { ReactRefreshRspackPlugin } from "@rspack/plugin-react-refresh";
|
|
4
4
|
|
|
5
5
|
const isDev = process.env.NODE_ENV === "development";
|
|
@@ -40,7 +40,7 @@ export default defineConfig({
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
env: { targets }
|
|
43
|
-
}
|
|
43
|
+
} satisfies SwcLoaderOptions
|
|
44
44
|
}
|
|
45
45
|
]
|
|
46
46
|
}
|
|
@@ -51,7 +51,7 @@ export default defineConfig({
|
|
|
51
51
|
template: "./index.html"
|
|
52
52
|
}),
|
|
53
53
|
isDev ? new ReactRefreshRspackPlugin() : null
|
|
54
|
-
]
|
|
54
|
+
],
|
|
55
55
|
optimization: {
|
|
56
56
|
minimizer: [
|
|
57
57
|
new rspack.SwcJsMinimizerRspackPlugin(),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
// @ts-check
|
|
1
2
|
import { defineConfig } from "@rspack/cli";
|
|
2
3
|
import { rspack } from "@rspack/core";
|
|
3
4
|
|
|
4
5
|
// Target browsers, see: https://github.com/browserslist/browserslist
|
|
5
|
-
const targets = ["last 2 versions", "> 0.2%",
|
|
6
|
+
const targets = ["last 2 versions", "> 0.2%", "not dead", "Firefox ESR"];
|
|
6
7
|
|
|
7
8
|
export default defineConfig({
|
|
8
9
|
entry: {
|
|
@@ -19,6 +20,7 @@ export default defineConfig({
|
|
|
19
20
|
use: [
|
|
20
21
|
{
|
|
21
22
|
loader: "builtin:swc-loader",
|
|
23
|
+
/** @type {import('@rspack/core').SwcLoaderOptions} */
|
|
22
24
|
options: {
|
|
23
25
|
jsc: {
|
|
24
26
|
parser: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineConfig } from "@rspack/cli";
|
|
2
|
-
import { rspack } from "@rspack/core";
|
|
2
|
+
import { rspack, type SwcLoaderOptions } from "@rspack/core";
|
|
3
3
|
|
|
4
4
|
// Target browsers, see: https://github.com/browserslist/browserslist
|
|
5
|
-
const targets = ["last 2 versions", "> 0.2%",
|
|
5
|
+
const targets = ["last 2 versions", "> 0.2%", "not dead", "Firefox ESR"];
|
|
6
6
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
entry: {
|
|
@@ -29,7 +29,7 @@ export default defineConfig({
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
env: { targets }
|
|
32
|
-
}
|
|
32
|
+
} satisfies SwcLoaderOptions
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
},
|
|
@@ -45,7 +45,7 @@ export default defineConfig({
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
env: { targets }
|
|
48
|
-
}
|
|
48
|
+
} satisfies SwcLoaderOptions
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
1
|
+
// @ts-check
|
|
3
2
|
import { defineConfig } from "@rspack/cli";
|
|
4
3
|
import { rspack } from "@rspack/core";
|
|
5
4
|
import { VueLoaderPlugin } from "vue-loader";
|
|
6
5
|
|
|
7
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
|
|
9
6
|
// Target browsers, see: https://github.com/browserslist/browserslist
|
|
10
7
|
const targets = ["last 2 versions", "> 0.2%", "not dead", "Firefox ESR"];
|
|
11
8
|
|
|
@@ -30,6 +27,7 @@ export default defineConfig({
|
|
|
30
27
|
use: [
|
|
31
28
|
{
|
|
32
29
|
loader: "builtin:swc-loader",
|
|
30
|
+
/** @type {import('@rspack/core').SwcLoaderOptions} */
|
|
33
31
|
options: {
|
|
34
32
|
jsc: {
|
|
35
33
|
parser: {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { defineConfig } from "@rspack/cli";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
type RspackPluginFunction,
|
|
4
|
+
rspack,
|
|
5
|
+
type SwcLoaderOptions
|
|
6
|
+
} from "@rspack/core";
|
|
3
7
|
import { VueLoaderPlugin } from "vue-loader";
|
|
4
8
|
|
|
5
9
|
// Target browsers, see: https://github.com/browserslist/browserslist
|
|
@@ -33,7 +37,7 @@ export default defineConfig({
|
|
|
33
37
|
}
|
|
34
38
|
},
|
|
35
39
|
env: { targets }
|
|
36
|
-
}
|
|
40
|
+
} satisfies SwcLoaderOptions
|
|
37
41
|
}
|
|
38
42
|
]
|
|
39
43
|
},
|