使用grunt从browserify生成源地图 [英] Generating source maps from browserify using grunt
本文介绍了使用grunt从browserify生成源地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遵循这里的说明: https://www.npmjs.org/package/grunt-browserify,尝试为grunt上的browserify设置源地图。我的grunt文件中的browserify选项是:
browserify:{
options:{
bundleOptions:{
debug:true
}
},
dist:{
文件:{
public / client.bundle.js:[bundle。 js]
}
}
}
bundle.js发生时没有任何问题,但源地图生成不会发生。我的grunt-browserify选项有什么问题吗?
感谢您的期待。 使用browserifyOptions代替bundleOptions / p>
browserify:{
选项:{
browserifyOptions:{
debug:true
}
},
...
}
I have followed the instructions here: https://www.npmjs.org/package/grunt-browserify, to try and set up source maps for browserify on grunt. The options for browserify in my gruntfile are :
browserify: {
options: {
bundleOptions : {
debug: true
}
},
dist: {
files: {
"public/client.bundle.js": ["bundle.js"]
}
}
}
The generation of bundle.js happens without any issues, however the source map generation does not happen. Is there anything wrong with my grunt-browserify options.
Thanks for looking.
解决方案
use browserifyOptions instead of bundleOptions
browserify: {
options: {
browserifyOptions: {
debug: true
}
},
...
}
这篇关于使用grunt从browserify生成源地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文