Javascript hjs网页包供应商js文件
我正在我的项目中使用Henrik Joreteg的hjs网页包插件。我正在努力让这个模块(以及所有的网页包)包含我想放在entry.vendors中的vendorJS+CSS文件 我的配置文件:Javascript hjs网页包供应商js文件,javascript,webpack,Javascript,Webpack,我正在我的项目中使用Henrik Joreteg的hjs网页包插件。我正在努力让这个模块(以及所有的网页包)包含我想放在entry.vendors中的vendorJS+CSS文件 我的配置文件: module.exports = getConfig({ //entry point in: 'src/app.jsx', out: 'public', //where compiled files will end up when finished isDev: pro
module.exports = getConfig({
//entry point
in: 'src/app.jsx',
out: 'public', //where compiled files will end up when finished
isDev: process.env.NODE_ENV !== 'production',
html: function(data){
return { 'index.html': data.defaultTemplate() }; //default template
},
clearBeforeBuild: true,
entry:{
vendors:['jquery']
},
resolve:{
alias:{
jquery:'jquery/src/jquery.js'
}
},
resolveLoader:{
root: path.join( __dirname, 'node_modules')
},
plugins:[
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
'window.jQuery':'jquery'
}),
new webpack.optimize.CommonsChunkPlugin('vendors','vendors.js')
]
});
此错误:
node_modules\webpack\lib\NormalModuleFactory.js:70
var elements = request.replace(/^-?!+/, "").replace(/!!+/g, "!").split("!")
^
TypeError: undefined is not a function
at Tapable.<anonymous> (C:\nodeProj\facebook\clientSide\node_modules\webpack\lib\NormalModuleFactory.js:70:27)
我最终放弃了hjs webpack,转而使用基于www.survive.js的普通webpack.config文件。在hjs webpack repo中打开了一个问题,看看他们是否有一天会解决这个问题。我最终放弃了hjs webpack,转而使用基于www.survive.js的普通webpack.config文件。在hjs网页回购协议中打开一个问题,看看他们是否有一天会解决这个问题。
entry:{
vendors:['jquery']
}