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

umi下ajv6.4.0,无法正常打包,报错 #426

Closed
jy4618272 opened this issue May 4, 2018 · 2 comments
Closed

umi下ajv6.4.0,无法正常打包,报错 #426

jy4618272 opened this issue May 4, 2018 · 2 comments

Comments

@jy4618272
Copy link

jy4618272 commented May 4, 2018

ajv6.4.0依赖"uri-js": "^4.2.1"
npm run build报错:
Failed to minify the bundle. Error: src__pages__index__page.d68c9114.async.js from UglifyJs

出错代码为:
// CONCATENATED MODULE: ./node_modules/uri-js/dist/esnext/util.js
function merge(...sets) {
if (sets.length > 1) {
sets[0] = sets[0].slice(0, -1);
const xl = sets.length - 1;
for (let x = 1; x < xl; ++x) {
sets[x] = sets[x].slice(1, -1);
}
sets[xl] = sets[xl].slice(1);
return sets.join('');
}
else {
return sets[0];
}
}

@sorrycc
Copy link
Member

sorrycc commented May 8, 2018

参考 sorrycc/blog#68

@sorrycc sorrycc closed this as completed May 8, 2018
@jy4618272
Copy link
Author

extraBabelIncludes:[
    "node_modules/uri-js/dist/esnext/uri.js",
    "node_modules/uri-js/dist/esnext/util.js",
    "node_modules/uri-js/dist/esnext/schemes/mailto.js",
    "node_modules/uri-js/dist/esnext/schemes/urn.js"
]

xierenyuan pushed a commit to xierenyuan/umi that referenced this issue Jun 23, 2022
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