提交 36c65246 编写于 作者: fxy060608's avatar fxy060608

fix(app): enforce inject (#3025)

上级 3fa5e2a9
......@@ -77,6 +77,8 @@ export function uniViteInjectPlugin(options: InjectOptions): Plugin {
const callback = options.callback
return {
name: 'vite:uni-inject',
// 确保在 commonjs 之后,否则会混合 es6 module 与 cjs 的代码,导致 commonjs 失效
enforce: 'post',
transform(code, id) {
if (!filter(id)) return null
if (!isJsFile(id)) return null
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册