Skip to content

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

@aninX

Description

@aninX

增加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?$/,

这样?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions