commit
a702fe2f7c
3 changed files with 4 additions and 9 deletions
|
@ -5,7 +5,6 @@
|
|||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
// 入口
|
||||
|
@ -63,10 +62,5 @@ module.exports = {
|
|||
plugins: [
|
||||
new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS
|
||||
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库
|
||||
new HtmlWebpackPlugin({ // 构建html文件
|
||||
filename: 'index.html',
|
||||
template: './test/index.html',
|
||||
inject: 'body'
|
||||
})
|
||||
]
|
||||
};
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
],
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"init": "webpack --progress --config build/webpack.config.js",
|
||||
"dev": "webpack-dev-server --content-base test/dist/ --open --inline --hot --compress --history-api-fallback --port 8081 --config build/webpack.config.js",
|
||||
"dev": "webpack-dev-server --content-base test/ --open --inline --hot --compress --history-api-fallback --port 8081 --config build/webpack.config.js",
|
||||
"build": "gulp --gulpfile build/build-style.js"
|
||||
},
|
||||
"repository": {
|
||||
|
@ -52,7 +51,6 @@
|
|||
"gulp-minify-css": "^1.2.4",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"html-loader": "^0.3.0",
|
||||
"html-webpack-plugin": "^2.22.0",
|
||||
"less": "^2.7.1",
|
||||
"less-loader": "^2.2.3",
|
||||
"style-loader": "^0.13.1",
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>iView test page</title>
|
||||
<link href="/test/dist/main.css" rel="stylesheet"></head>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="text/javascript" src="/test/dist/vendors.js"></script>
|
||||
<script type="text/javascript" src="/test/dist/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Reference in a new issue