@umijs/bundler-utoopack 4.0.0-canary.20251104.1 → 4.0.0-canary.20251113.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.
Files changed (2) hide show
  1. package/dist/config.js +12 -2
  2. package/package.json +5 -5
package/dist/config.js CHANGED
@@ -50,7 +50,13 @@ function convertProcessEnvForUtoopack(webpackConfig) {
50
50
  function getModularizeImports(extraBabelPlugins) {
51
51
  return extraBabelPlugins.filter((p) => /^import$|babel-plugin-import/.test(p[0])).reduce(
52
52
  (acc, [_, v]) => {
53
- const { libraryName, libraryDirectory, style, ...rest } = v;
53
+ const {
54
+ libraryName,
55
+ libraryDirectory,
56
+ style,
57
+ camel2DashComponentName,
58
+ ...rest
59
+ } = v;
54
60
  if (Object.keys(rest).length > 0) {
55
61
  throw new Error(
56
62
  `babel-plugin-import options ${Object.keys(
@@ -63,8 +69,12 @@ function getModularizeImports(extraBabelPlugins) {
63
69
  `babel-plugin-import style function is not supported in utoopack bundler`
64
70
  );
65
71
  }
72
+ let transformRule = "{{ kebabCase member }}";
73
+ if (camel2DashComponentName === false) {
74
+ transformRule = "{{ member }}";
75
+ }
66
76
  acc[libraryName] = {
67
- transform: `${libraryName}/${libraryDirectory}/{{ kebabCase member }}`,
77
+ transform: `${libraryName}/${libraryDirectory}/${transformRule}`,
68
78
  preventFullImport: false,
69
79
  skipDefaultConversion: false,
70
80
  style: typeof style === "boolean" ? "style" : style
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-utoopack",
3
- "version": "4.0.0-canary.20251104.1",
3
+ "version": "4.0.0-canary.20251113.1",
4
4
  "description": "@umijs/bundler-utoopack",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,15 +13,15 @@
13
13
  "cors": "^2.8.5",
14
14
  "express": "^4.18.2",
15
15
  "express-http-proxy": "^2.1.1",
16
- "@umijs/bundler-webpack": "4.0.0-canary.20251104.1",
17
- "@umijs/bundler-utils": "4.0.0-canary.20251104.1"
16
+ "@umijs/bundler-utils": "4.0.0-canary.20251113.1",
17
+ "@umijs/bundler-webpack": "4.0.0-canary.20251113.1"
18
18
  },
19
19
  "devDependencies": {
20
- "@utoo/pack": "^0.0.1-alpha.62",
20
+ "@utoo/pack": "^0.0.1-alpha.69",
21
21
  "father": "4.1.5"
22
22
  },
23
23
  "peerDependencies": {
24
- "@utoo/pack": "^0.0.1-alpha.62"
24
+ "@utoo/pack": "^0.0.1-alpha.69"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"