Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否可以支持读取babelrc的配置 #543

Closed
JoeWrights opened this issue Nov 1, 2022 · 5 comments
Closed

是否可以支持读取babelrc的配置 #543

JoeWrights opened this issue Nov 1, 2022 · 5 comments

Comments

@JoeWrights
Copy link

现在遇到一个问题:组件中有中文字符,按cjs打包出来中文字符变成了unicode,组件在umi项目里引用报错
image

现在想的是能不能自定义除babel plugin或者presets以外的配置呢,或者umi那边有什么好的处理方法

@fz6m
Copy link
Member

fz6m commented Nov 1, 2022

https://github.com/umijs/father/pull/538/files#r1002610497 这个问题同样

@PeachScript
Copy link
Member

v4.1.1 把 esbuild 默认改成 utf-8 了,可以再试下

@JoeWrights
Copy link
Author

JoeWrights commented Dec 8, 2022

v4.1.1 把 esbuild 默认改成 utf-8 了,可以再试下

大佬,还是不行额
image
fatherrc配置是这样的

import { defineConfig } from "father"

export default defineConfig({
    cjs: {
        output: "lib/"
    },
    esm: {
        output: "es/"
    },
    umd: {
        output: "dist/"
    },
})

@PeachScript
Copy link
Member

我这里测试是 OK 的,如果装依赖不是删掉 node_modules 再装的话,可能是持久缓存的缘故,删掉 node_modules/.cache 再试下

@JoeWrights
Copy link
Author

我这里测试是 OK 的,如果装依赖不是删掉 node_modules 再装的话,可能是持久缓存的缘故,删掉 node_modules/.cache 再试下

重新试了下,可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants