<!-- html -->
<script src="vendors/js/jquery-1.11.3.js"></script>
<script src="vendors/js/jquery.waypoints.min.js"></script>
<script src="resources/js/script.js"></script>
<script src="combination.js"></script> <!-- 合并后用不了 -->
//webpack.config.js
module.exports = {
entry: {
bundle1: './vendors/js/jquery-1.11.3.js',
bundle2: './vendors/js/jquery.waypoints.min.js',
bundle3: './vendors/js/html5shiv.js'
},
output: {
filename: 'combination.js'
},
module: {
loaders:[
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192' }
]
}
};
//package.json
{
"name": "ap",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
刚学webpack,想把这些js都打包了,但是打包出来的用不了,是什么原因。。
相关分类