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

Windows 下小程序开启optimizeMainPackage优化主包大小后webpack打包报错 #9422

Closed
fengyibo opened this issue May 30, 2021 · 2 comments

Comments

@fengyibo
Copy link

操作系统:Windows 10
设置optimizeMainPackage 为 true后执行npm run dev:weapp 报错如下:

\ 正在编译...Error parsing bundle asset "D:\repos\weapp2\dist\sub-common\1918e06103fbb56c1892e28c3ec7f97d.js": no such file
Error parsing bundle asset "D:\repos\weapp2\dist\sub-common\22785c4bbefac20b21226e6ae1e00826.js": no such file
Error parsing bundle asset "D:\repos\weapp2\dist\sub-common\29465e21e4b4cc5165c1ded443ee4be1.js": no such file

相同的代码在ubuntu下打包正常
初步猜测windows下 路分隔符和ubuntu不一样,没做兼容处理,修复应该不负责

/**
 * match sub-common\/*
 */
matchSubCommon(chunk) {
    return new RegExp(`^${SUB_COMMON_DIR}\\/`).test(chunk.name);
}

对前端不熟悉,希望有人处理一下

@taro-bot2
Copy link

taro-bot2 bot commented May 30, 2021

您的 Issue 没有按照规范从 Taro Issue Helper 创建,因此会被直接关闭。

维护开源项目是一项非常辛苦的工作,还请多多包涵。
了解为什么这么严格?

@huangcj99
Copy link
Contributor

@fengyibo 应该是路径问题,我回家用window测测

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