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

better source map #3

Open
goldlin opened this issue Jan 24, 2019 · 4 comments
Open

better source map #3

goldlin opened this issue Jan 24, 2019 · 4 comments
Labels
Discussion 需要讨论决定的

Comments

@goldlin
Copy link

goldlin commented Jan 24, 2019

根据实际使用效果来看,似乎devtool设置为 inline-cheap-module-source-map 效果会更好,webpack://src下能很好的对应到vue中的js,断点也工作正常,同时编译速度没什么影响

@bigmeow
Copy link
Member

bigmeow commented Jan 25, 2019

我测试发现改成你说的,会有一堆报错,体积还直接大了一倍

@bigmeow
Copy link
Member

bigmeow commented Jan 25, 2019

有空一个个再测试一遍:
https://webpack.docschina.org/configuration/devtool/#devtool

@bigmeow bigmeow added the Discussion 需要讨论决定的 label Jan 25, 2019
@goldlin
Copy link
Author

goldlin commented Jan 28, 2019

我测试发现改成你说的,会有一堆报错,体积还直接大了一倍

dev下体积应该不要紧?只要不用再production就没关系
我使用的项目里倒是没有报错

@goldlin
Copy link
Author

goldlin commented Feb 25, 2019

https://developers.weixin.qq.com/miniprogram/dev/devtools/debug.html#source-map

开发者工具会读取、解析 Source Map 文件,并进行将其上传

后续可以在小程序后台的运营中心可以利用上传的 Source Map 文件进行错误分析

Source Map 文件不计入代码包大小计算。
开发版代码包中由于包含了 .map 文件,实际代码包大小会比体验版和正式版大。

所以理论上不需要特意对build做关闭source-map的处理了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion 需要讨论决定的
Projects
None yet
Development

No branches or pull requests

2 participants