Skip to content

Commit c60f533

Browse files
committed
fix: remove unused experiments from rspack configurations
1 parent 4f8c0f1 commit c60f533

File tree

8 files changed

+42
-65
lines changed

8 files changed

+42
-65
lines changed

rspack/inline-const-enum/rspack.config.mjs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,40 @@
33
/** @type {import("@rspack/core").Configuration} */
44
export default {
55
entry: {
6-
main: "./src/index.ts",
6+
main: './src/index.ts',
77
},
8-
experiments: {
9-
inlineEnum: true,
10-
},
11-
mode: "production",
8+
mode: 'production',
129
optimization: {
1310
// disable minimize so you can understand the output
1411
minimize: false,
1512
},
1613
resolve: {
17-
extensions: [".ts", "..."],
14+
extensions: ['.ts', '...'],
1815
},
1916
module: {
2017
rules: [
2118
{
2219
test: /\.ts$/,
2320
use: {
24-
loader: "builtin:swc-loader",
21+
loader: 'builtin:swc-loader',
2522
/** @type {import("@rspack/core").SwcLoaderOptions} */
2623
options: {
2724
jsc: {
2825
parser: {
29-
syntax: "typescript",
26+
syntax: 'typescript',
3027
},
3128
transform: {
3229
tsEnumIsMutable: true,
33-
}
30+
},
3431
},
3532
rspackExperiments: {
3633
collectTypeScriptInfo: {
3734
exportedEnum: 'const-only',
38-
}
39-
}
35+
},
36+
},
4037
},
4138
},
42-
type: "javascript/auto",
39+
type: 'javascript/auto',
4340
},
4441
],
4542
},

rspack/inline-const/rspack.config.mjs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,41 @@
11
// @ts-check
2-
import { rspack } from "@rspack/core";
2+
import { rspack } from '@rspack/core';
33

44
/** @type {import("@rspack/core").Configuration} */
55
export default {
66
entry: {
7-
main: "./src/index.ts",
7+
main: './src/index.ts',
88
},
9-
experiments: {
10-
inlineConst: true,
11-
},
12-
mode: "production",
9+
mode: 'production',
1310
optimization: {
1411
// disable minimize so you can understand the output
1512
minimize: false,
1613
},
1714
resolve: {
18-
extensions: [".ts", "..."],
15+
extensions: ['.ts', '...'],
1916
},
2017
plugins: [
2118
new rspack.DefinePlugin({
22-
ENV: JSON.stringify("mobile"),
19+
ENV: JSON.stringify('mobile'),
2320
}),
2421
],
2522
module: {
2623
rules: [
2724
{
2825
test: /\.ts$/,
2926
use: {
30-
loader: "builtin:swc-loader",
27+
loader: 'builtin:swc-loader',
3128
/** @type {import("@rspack/core").SwcLoaderOptions} */
3229
options: {
3330
jsc: {
3431
parser: {
35-
syntax: "typescript",
32+
syntax: 'typescript',
3633
},
37-
target: "es2015", // use target es2015 or greater so swc won't transform const to var
34+
target: 'es2015', // use target es2015 or greater so swc won't transform const to var
3835
},
3936
},
4037
},
41-
type: "javascript/auto",
38+
type: 'javascript/auto',
4239
},
4340
],
4441
},

rspack/inline-enum/rspack.config.mjs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,37 @@
33
/** @type {import("@rspack/core").Configuration} */
44
export default {
55
entry: {
6-
main: "./src/index.ts",
6+
main: './src/index.ts',
77
},
8-
experiments: {
9-
inlineEnum: true,
10-
},
11-
mode: "production",
8+
mode: 'production',
129
optimization: {
1310
// disable minimize so you can understand the output
1411
minimize: false,
1512
},
1613
resolve: {
17-
extensions: [".ts", "..."],
14+
extensions: ['.ts', '...'],
1815
},
1916
module: {
2017
rules: [
2118
{
2219
test: /\.ts$/,
2320
use: {
24-
loader: "builtin:swc-loader",
21+
loader: 'builtin:swc-loader',
2522
/** @type {import("@rspack/core").SwcLoaderOptions} */
2623
options: {
2724
jsc: {
2825
parser: {
29-
syntax: "typescript",
30-
}
26+
syntax: 'typescript',
27+
},
3128
},
3229
rspackExperiments: {
3330
collectTypeScriptInfo: {
3431
exportedEnum: true,
35-
}
36-
}
32+
},
33+
},
3734
},
3835
},
39-
type: "javascript/auto",
36+
type: 'javascript/auto',
4037
},
4138
],
4239
},

rspack/lazy-compilation-server/dev.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ const compiler = rspack({
55
entry: './src/index.js',
66
context: __dirname,
77
plugins: [new rspack.HtmlRspackPlugin()],
8-
experiments: {
9-
lazyCompilation: {
10-
backend: {
11-
server() {
12-
return devServer.server;
13-
},
8+
lazyCompilation: {
9+
backend: {
10+
server() {
11+
return devServer.server;
1412
},
1513
},
1614
},

rspack/react-with-extract-css/rspack.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,5 @@ const config = {
6262
output: {
6363
path: path.resolve(__dirname, 'dist'),
6464
},
65-
experiments: {
66-
css: false,
67-
},
6865
};
6966
module.exports = config;

rspack/type-reexports-presence/rspack.config.mjs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,42 @@
33
/** @type {import("@rspack/core").Configuration} */
44
export default {
55
entry: {
6-
main: "./src/index.ts",
6+
main: './src/index.ts',
77
},
8-
experiments: {
9-
typeReexportsPresence: true,
10-
},
11-
mode: "production",
8+
mode: 'production',
129
optimization: {
1310
// disable minimize so you can understand the output
1411
minimize: false,
1512
},
1613
resolve: {
17-
extensions: [".ts", "..."],
14+
extensions: ['.ts', '...'],
1815
},
1916
module: {
2017
parser: {
2118
javascript: {
22-
typeReexportsPresence: "tolerant",
23-
}
19+
typeReexportsPresence: 'tolerant',
20+
},
2421
},
2522
rules: [
2623
{
2724
test: /\.ts$/,
2825
use: {
29-
loader: "builtin:swc-loader",
26+
loader: 'builtin:swc-loader',
3027
/** @type {import("@rspack/core").SwcLoaderOptions} */
3128
options: {
3229
jsc: {
3330
parser: {
34-
syntax: "typescript",
35-
}
31+
syntax: 'typescript',
32+
},
3633
},
3734
rspackExperiments: {
3835
collectTypeScriptInfo: {
3936
typeExports: true,
40-
}
41-
}
37+
},
38+
},
4239
},
4340
},
44-
type: "javascript/auto",
41+
type: 'javascript/auto',
4542
},
4643
],
4744
},

rspack/vue2-ts/rspack.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,5 @@ const config = {
6161
},
6262
],
6363
},
64-
experiments: {
65-
css: false,
66-
},
6764
};
6865
module.exports = config;

rspack/vue3-vanilla/rspack.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,5 @@ const config = {
6262
},
6363
],
6464
},
65-
experiments: {
66-
css: false,
67-
},
6865
};
6966
module.exports = config;

0 commit comments

Comments
 (0)