我正在尝试加载handlebars-loader enter code here
,但我的应用程序挂了。它加载app.bundle.js
但不执行任何进一步的脚本。控制台中没有输出。
module.exports = {
module: {
loaders: [{
exclude: /node_modules/,
loader: 'handlebars-loader'
}, {
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}]
}
};
当我尝试通过插件加载handlebars
时:
plugins: [
new webpack.ProvidePlugin({
handlebars: "handlebars",
"windows.handlebars": "handlebars"
})
],
我已handlevars
已解除限制但webpack
在编译后出错:
ERROR in ./~/handlebars/lib/index.js
Module not found: Error: Can't resolve 'fs' in 'E:\Dev\Micron\node_modules\handlebars\lib'
@ ./~/handlebars/lib/index.js 17:11-24
@ ./src/core/index.js
@ ./src/app.js
我如何通过网络包装来handlebars
?