@next-core/build-next-bricks 1.20.10 → 1.21.1
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/index.d.ts +8 -1
- package/package.json +8 -8
- package/src/build.js +3 -0
package/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
Compiler,
|
|
3
|
+
Configuration,
|
|
4
|
+
ResolveOptions,
|
|
5
|
+
RuleSetRule,
|
|
6
|
+
container,
|
|
7
|
+
} from "webpack";
|
|
2
8
|
|
|
3
9
|
export declare function build(config: BuildNextBricksConfig): Compiler;
|
|
4
10
|
export declare function getSvgrLoaders(options?: {
|
|
@@ -83,6 +89,7 @@ export interface BuildNextBricksConfig {
|
|
|
83
89
|
imageAssetFilename?: string | ((pathData: any, assetInfo: any) => string);
|
|
84
90
|
plugins?: Configuration["plugins"];
|
|
85
91
|
moduleRules?: RuleSetRule[];
|
|
92
|
+
resolve?: ResolveOptions;
|
|
86
93
|
exposes?: ConstructorParameters<
|
|
87
94
|
typeof container.ModuleFederationPlugin
|
|
88
95
|
>[0]["exposes"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/build-next-bricks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"description": "Build next bricks",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/build-next-bricks",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"node": ">=16"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@babel/parser": "^7.24.
|
|
37
|
-
"@babel/traverse": "^7.24.
|
|
36
|
+
"@babel/parser": "^7.24.6",
|
|
37
|
+
"@babel/traverse": "^7.24.6",
|
|
38
38
|
"@svgr/webpack": "^8.1.0",
|
|
39
39
|
"babel-loader": "^9.1.3",
|
|
40
|
-
"css-loader": "^
|
|
40
|
+
"css-loader": "^7.1.2",
|
|
41
41
|
"cssnano": "^7.0.1",
|
|
42
42
|
"cssnano-preset-lite": "^4.0.0",
|
|
43
43
|
"doctrine": "^3.0.0",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"mini-css-extract-plugin": "^2.9.0",
|
|
48
48
|
"postcss": "^8.4.38",
|
|
49
49
|
"postcss-loader": "^8.1.1",
|
|
50
|
-
"postcss-preset-env": "^9.5.
|
|
51
|
-
"prettier": "^3.
|
|
52
|
-
"style-loader": "^
|
|
50
|
+
"postcss-preset-env": "^9.5.14",
|
|
51
|
+
"prettier": "^3.3.0",
|
|
52
|
+
"style-loader": "^4.0.0",
|
|
53
53
|
"typescript": "^5.4.5",
|
|
54
54
|
"webpack": "^5.91.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@next-core/brick-manifest": "^0.7.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "34346d51d4a58dbf496de22f2f06a3dd43dae52d"
|
|
60
60
|
}
|
package/src/build.js
CHANGED
|
@@ -314,6 +314,7 @@ async function getWebpackConfig(config) {
|
|
|
314
314
|
extensionAlias: {
|
|
315
315
|
".js": [".ts", ".tsx", ".js", ".jsx"],
|
|
316
316
|
},
|
|
317
|
+
...config.resolve,
|
|
317
318
|
},
|
|
318
319
|
module: {
|
|
319
320
|
rules: [
|
|
@@ -358,6 +359,8 @@ async function getWebpackConfig(config) {
|
|
|
358
359
|
config.extractCss ? MiniCssExtractPlugin.loader : "style-loader",
|
|
359
360
|
...getCssLoaders({
|
|
360
361
|
modules: {
|
|
362
|
+
namedExport: false,
|
|
363
|
+
exportLocalsConvention: "as-is",
|
|
361
364
|
localIdentName: "[local]--[hash:base64:8]",
|
|
362
365
|
},
|
|
363
366
|
}),
|