@modern-js/builder 2.15.0 → 2.17.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/CHANGELOG.md +28 -0
- package/dist/plugins/svg.js +10 -0
- package/package.json +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @modern-js/builder
|
|
2
2
|
|
|
3
|
+
## 2.17.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @modern-js/builder-shared@2.17.0
|
|
8
|
+
- @modern-js/utils@2.17.0
|
|
9
|
+
|
|
10
|
+
## 2.16.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 4e876ab: chore: package.json include the monorepo-relative directory
|
|
15
|
+
|
|
16
|
+
chore: 在 package.json 中声明 monorepo 的子路径
|
|
17
|
+
|
|
18
|
+
- fb19f48: feat(builder): add output.disableSvgr configuration item
|
|
19
|
+
|
|
20
|
+
feat(builder): 新增 output.disableSvgr 配置项
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [fe92de6]
|
|
23
|
+
- Updated dependencies [091986a]
|
|
24
|
+
- Updated dependencies [5954330]
|
|
25
|
+
- Updated dependencies [7596520]
|
|
26
|
+
- Updated dependencies [4e876ab]
|
|
27
|
+
- Updated dependencies [e4e0e01]
|
|
28
|
+
- @modern-js/builder-shared@2.16.0
|
|
29
|
+
- @modern-js/utils@2.16.0
|
|
30
|
+
|
|
3
31
|
## 2.15.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
package/dist/plugins/svg.js
CHANGED
|
@@ -19,6 +19,16 @@ const builderPluginSvg = () => {
|
|
|
19
19
|
const outputName = path_1.default.posix.join(distDir, filename);
|
|
20
20
|
const maxSize = config.output.dataUriLimit[assetType];
|
|
21
21
|
const rule = chain.module.rule(CHAIN_ID.RULE.SVG).test(builder_shared_1.SVG_REGEX);
|
|
22
|
+
if (config.output.disableSvgr) {
|
|
23
|
+
// treat all .svg files as assets.
|
|
24
|
+
(0, builder_shared_1.chainStaticAssetRule)({
|
|
25
|
+
rule,
|
|
26
|
+
maxSize,
|
|
27
|
+
filename: path_1.default.posix.join(distDir, filename),
|
|
28
|
+
assetType,
|
|
29
|
+
});
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
22
32
|
// If we import SVG from a CSS file, it will be processed as assets.
|
|
23
33
|
(0, builder_shared_1.chainStaticAssetRule)({
|
|
24
34
|
rule,
|
package/package.json
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
"description": "Builder of modern.js.",
|
|
4
4
|
"homepage": "https://modernjs.dev",
|
|
5
5
|
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
|
|
6
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/web-infra-dev/modern.js",
|
|
9
|
+
"directory": "packages/builder/builder"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"keywords": [
|
|
9
13
|
"react",
|
|
@@ -14,7 +18,7 @@
|
|
|
14
18
|
"engines": {
|
|
15
19
|
"node": ">=14.0.0"
|
|
16
20
|
},
|
|
17
|
-
"version": "2.
|
|
21
|
+
"version": "2.17.0",
|
|
18
22
|
"jsnext:source": "./src/index.ts",
|
|
19
23
|
"types": "./dist/index.d.ts",
|
|
20
24
|
"main": "./dist/index.js",
|
|
@@ -27,8 +31,8 @@
|
|
|
27
31
|
},
|
|
28
32
|
"dependencies": {
|
|
29
33
|
"@svgr/webpack": "6.5.1",
|
|
30
|
-
"@modern-js/builder-shared": "2.
|
|
31
|
-
"@modern-js/utils": "2.
|
|
34
|
+
"@modern-js/builder-shared": "2.17.0",
|
|
35
|
+
"@modern-js/utils": "2.17.0"
|
|
32
36
|
},
|
|
33
37
|
"devDependencies": {
|
|
34
38
|
"@babel/core": "7.18.0",
|
|
@@ -36,7 +40,7 @@
|
|
|
36
40
|
"@types/babel__preset-env": "^7.9.2",
|
|
37
41
|
"@types/node": "^14",
|
|
38
42
|
"typescript": "^4",
|
|
39
|
-
"@scripts/vitest-config": "2.
|
|
43
|
+
"@scripts/vitest-config": "2.17.0"
|
|
40
44
|
},
|
|
41
45
|
"publishConfig": {
|
|
42
46
|
"registry": "https://registry.npmjs.org/",
|