Commit a702fe2f7c0495f6ab6a98eeba9dba76a6c641d2
Committed by
GitHub
Merge pull request #40 from jingsam/master
delete init script
Showing
3 changed files
with
4 additions
and
9 deletions
Show diff stats
build/webpack.config.js
... | ... | @@ -5,7 +5,6 @@ |
5 | 5 | var path = require('path'); |
6 | 6 | var webpack = require('webpack'); |
7 | 7 | var ExtractTextPlugin = require('extract-text-webpack-plugin'); |
8 | -var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
9 | 8 | |
10 | 9 | module.exports = { |
11 | 10 | // 入口 |
... | ... | @@ -63,10 +62,5 @@ module.exports = { |
63 | 62 | plugins: [ |
64 | 63 | new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS |
65 | 64 | new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库 |
66 | - new HtmlWebpackPlugin({ // 构建html文件 | |
67 | - filename: 'index.html', | |
68 | - template: './test/index.html', | |
69 | - inject: 'body' | |
70 | - }) | |
71 | 65 | ] |
72 | 66 | }; | ... | ... |
package.json
... | ... | @@ -15,8 +15,7 @@ |
15 | 15 | ], |
16 | 16 | "main": "src/index.js", |
17 | 17 | "scripts": { |
18 | - "init": "webpack --progress --config build/webpack.config.js", | |
19 | - "dev": "webpack-dev-server --content-base test/dist/ --open --inline --hot --compress --history-api-fallback --port 8081 --config build/webpack.config.js", | |
18 | + "dev": "webpack-dev-server --content-base test/ --open --inline --hot --compress --history-api-fallback --port 8081 --config build/webpack.config.js", | |
20 | 19 | "build": "gulp --gulpfile build/build-style.js" |
21 | 20 | }, |
22 | 21 | "repository": { |
... | ... | @@ -52,7 +51,6 @@ |
52 | 51 | "gulp-minify-css": "^1.2.4", |
53 | 52 | "gulp-rename": "^1.2.2", |
54 | 53 | "html-loader": "^0.3.0", |
55 | - "html-webpack-plugin": "^2.22.0", | |
56 | 54 | "less": "^2.7.1", |
57 | 55 | "less-loader": "^2.2.3", |
58 | 56 | "style-loader": "^0.13.1", | ... | ... |
test/index.html
... | ... | @@ -3,8 +3,11 @@ |
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <title>iView test page</title> |
6 | + <link href="/test/dist/main.css" rel="stylesheet"></head> | |
6 | 7 | </head> |
7 | 8 | <body> |
8 | 9 | <div id="app"></div> |
10 | + <script type="text/javascript" src="/test/dist/vendors.js"></script> | |
11 | + <script type="text/javascript" src="/test/dist/main.js"></script> | |
9 | 12 | </body> |
10 | 13 | </html> | ... | ... |