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

添加编译的文件不支持mjs类型 #358

Open
aninX opened this issue Jul 1, 2024 · 1 comment
Open

添加编译的文件不支持mjs类型 #358

aninX opened this issue Jul 1, 2024 · 1 comment

Comments

@aninX
Copy link

aninX commented Jul 1, 2024

增加babel编译的文件配置
build: {
script: {
babel: resource => resource.includes(src) || resource.includes(node_modules/some-lib/),
},
},
这个不支持mjs文件,需要自己添加新的rule.
但是使用 @reskript/plugin-experimental中的buildFast插件时没有配置选项,怎么添加swc对mjs类型支持?
图片
这个规则能否直接改成

test: /.m?[jt]sx?$/,

这样?

@otakustay
Copy link
Member

来看看这个正则对不:/\.[mc]?[jt]sx?$/

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

2 participants