Skip to content

Commit 2d5a744

Browse files
authored
chore: prefer to use named import (#230)
1 parent 3a0a156 commit 2d5a744

File tree

60 files changed

+74
-75
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+74
-75
lines changed

rsdoctor/rspack/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const rspack = require('@rspack/core');
1+
const { rspack } = require('@rspack/core');
22
const ReactRefreshPlugin = require('@rspack/plugin-react-refresh');
33
const { RsdoctorRspackPlugin } = require('@rsdoctor/rspack-plugin');
44

rspack/cra-ts/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const rspack = require('@rspack/core');
1+
const { rspack } = require('@rspack/core');
22
const ReactRefreshPlugin = require('@rspack/plugin-react-refresh');
33
/** @type {import('@rspack/cli').Configuration} */
44
const config = {

rspack/cra/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const rspack = require('@rspack/core');
1+
const { rspack } = require('@rspack/core');
22
const ReactRefreshPlugin = require('@rspack/plugin-react-refresh');
33
/** @type {import('@rspack/cli').Configuration} */
44
const config = {

rspack/css-parser-generator-options/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const path = require('path');
2-
const rspack = require('@rspack/core');
2+
const { rspack } = require('@rspack/core');
33

44
/** @type {import('@rspack/cli').Configuration} */
55
const config = {
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
const rspack = require('@rspack/core')
1+
const { rspack } = require('@rspack/core');
32
const path = require('node:path');
43

54
/** @type {import('@rspack/cli').Configuration} */
@@ -9,7 +8,7 @@ const config = {
98
path: path.resolve(__dirname, 'dist'),
109
},
1110
resolve: {
12-
extensions: ['...', '.ts', '.tsx', '.js', '.jsx']
11+
extensions: ['...', '.ts', '.tsx', '.js', '.jsx'],
1312
},
1413
plugins: [
1514
new rspack.DllReferencePlugin({
@@ -19,10 +18,10 @@ const config = {
1918
new rspack.DllReferencePlugin({
2019
manifest: path.resolve(__dirname, '../dll/dist/beta.manifest.json'),
2120
scope: 'beta',
22-
extensions: [".js", ".jsx", '.ts', '.tsx']
21+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
2322
}),
2423
],
25-
mode: 'development'
26-
}
24+
mode: 'development',
25+
};
2726

28-
module.exports = config;
27+
module.exports = config;

rspack/dll/rspack.config.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
const rspack = require('@rspack/core')
1+
const { rspack } = require('@rspack/core');
32
const path = require('node:path');
43

54
/** @type {import('@rspack/cli').Configuration} */
@@ -8,20 +7,20 @@ const config = {
87
extensions: ['...', '.ts', '.tsx', '.js', '.jsx'],
98
},
109
entry: {
11-
alpha: ["./alpha", "./a", "lodash"],
12-
beta: ["./beta", "./b", "./c"],
10+
alpha: ['./alpha', './a', 'lodash'],
11+
beta: ['./beta', './b', './c'],
1312
},
1413
output: {
1514
path: path.resolve(__dirname, 'dist'),
1615
filename: '[name].dll.js',
17-
library: '[name]_dll_lib'
16+
library: '[name]_dll_lib',
1817
},
1918
plugins: [
2019
new rspack.DllPlugin({
21-
path: path.join(__dirname, "dist", "[name].manifest.json"),
20+
path: path.join(__dirname, 'dist', '[name].manifest.json'),
2221
name: '[name]_dll_lib',
23-
})
24-
]
25-
}
22+
}),
23+
],
24+
};
2625

27-
module.exports = config;
26+
module.exports = config;

rspack/emotion/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const rspack = require('@rspack/core');
1+
const { rspack } = require('@rspack/core');
22
/** @type {import('@rspack/cli').Configuration} */
33
const config = {
44
entry: {

rspack/extract-license/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const rspack = require('@rspack/core');
1+
const { rspack } = require('@rspack/core');
22
/** @type {import('@rspack/cli').Configuration} */
33
const config = {
44
context: __dirname,

rspack/hooks/after-resolve/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const rspack = require('@rspack/core');
1+
const { rspack } = require('@rspack/core');
22
/** @type {import('@rspack/cli').Configuration} */
33
const config = {
44
entry: './src/index.js',

rspack/lightingcss-loader/rspack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const rspack = require('@rspack/core');
1+
const { rspack } = require('@rspack/core');
22
/** @type {import('@rspack/cli').Configuration} */
33
const config = {
44
entry: './src/index.js',

0 commit comments

Comments
 (0)