@umijs/bundler-utoopack 4.6.19 → 4.6.20

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.
Files changed (2) hide show
  1. package/dist/config.js +19 -12
  2. package/package.json +4 -5
package/dist/config.js CHANGED
@@ -152,21 +152,28 @@ function getSvgModuleRules(opts) {
152
152
  "*.svg": {
153
153
  loaders: [
154
154
  {
155
- loader: require.resolve("@svgr/webpack"),
156
- condition: {
157
- all: [
158
- // Exclude node_modules (similar to excluding non-source files)
159
- { not: "foreign" },
160
- // Match JavaScript/TypeScript files
161
- { path: /\.[jt]sx?$/ }
162
- ]
163
- },
155
+ loader: require.resolve("@umijs/bundler-webpack/dist/loader/svgr"),
164
156
  options: {
165
- exportType: "named",
166
- namedExport: "ReactComponent",
167
- ref: true,
157
+ svgoConfig: {
158
+ plugins: [
159
+ {
160
+ name: "preset-default",
161
+ params: {
162
+ overrides: {
163
+ removeTitle: false
164
+ }
165
+ }
166
+ },
167
+ "prefixIds"
168
+ ],
169
+ ...typeof svgo === "object" ? svgo : {}
170
+ },
171
+ ...svgr,
168
172
  svgo: !!svgo
169
173
  }
174
+ },
175
+ {
176
+ loader: require.resolve("@umijs/bundler-webpack/compiled/url-loader")
170
177
  }
171
178
  ],
172
179
  as: "*.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-utoopack",
3
- "version": "4.6.19",
3
+ "version": "4.6.20",
4
4
  "description": "@umijs/bundler-utoopack",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,15 +8,14 @@
8
8
  "dist"
9
9
  ],
10
10
  "dependencies": {
11
- "@svgr/webpack": "^8.1.0",
12
- "@utoo/pack": "1.1.17",
11
+ "@utoo/pack": "1.1.18",
13
12
  "compression": "^1.7.4",
14
13
  "connect-history-api-fallback": "^2.0.0",
15
14
  "cors": "^2.8.5",
16
15
  "express": "^4.18.2",
17
16
  "express-http-proxy": "^2.1.1",
18
- "@umijs/bundler-utils": "4.6.19",
19
- "@umijs/bundler-webpack": "4.6.19"
17
+ "@umijs/bundler-webpack": "4.6.20",
18
+ "@umijs/bundler-utils": "4.6.20"
20
19
  },
21
20
  "devDependencies": {
22
21
  "father": "4.1.5"