Commit 5a4a079b909e66e517d2d028bf1576f021d444a4
1 parent
d6342fe1
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,7 +5,6 @@ | ||
5 | var path = require('path'); | 5 | var path = require('path'); |
6 | var webpack = require('webpack'); | 6 | var webpack = require('webpack'); |
7 | var ExtractTextPlugin = require('extract-text-webpack-plugin'); | 7 | var ExtractTextPlugin = require('extract-text-webpack-plugin'); |
8 | -var HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
9 | 8 | ||
10 | module.exports = { | 9 | module.exports = { |
11 | // 入口 | 10 | // 入口 |
@@ -63,10 +62,5 @@ module.exports = { | @@ -63,10 +62,5 @@ module.exports = { | ||
63 | plugins: [ | 62 | plugins: [ |
64 | new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS | 63 | new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS |
65 | new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库 | 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,8 +15,7 @@ | ||
15 | ], | 15 | ], |
16 | "main": "src/index.js", | 16 | "main": "src/index.js", |
17 | "scripts": { | 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 | "build": "gulp --gulpfile build/build-style.js" | 19 | "build": "gulp --gulpfile build/build-style.js" |
21 | }, | 20 | }, |
22 | "repository": { | 21 | "repository": { |
@@ -52,7 +51,6 @@ | @@ -52,7 +51,6 @@ | ||
52 | "gulp-minify-css": "^1.2.4", | 51 | "gulp-minify-css": "^1.2.4", |
53 | "gulp-rename": "^1.2.2", | 52 | "gulp-rename": "^1.2.2", |
54 | "html-loader": "^0.3.0", | 53 | "html-loader": "^0.3.0", |
55 | - "html-webpack-plugin": "^2.22.0", | ||
56 | "less": "^2.7.1", | 54 | "less": "^2.7.1", |
57 | "less-loader": "^2.2.3", | 55 | "less-loader": "^2.2.3", |
58 | "style-loader": "^0.13.1", | 56 | "style-loader": "^0.13.1", |
test/index.html
@@ -3,8 +3,11 @@ | @@ -3,8 +3,11 @@ | ||
3 | <head> | 3 | <head> |
4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
5 | <title>iView test page</title> | 5 | <title>iView test page</title> |
6 | + <link href="/test/dist/main.css" rel="stylesheet"></head> | ||
6 | </head> | 7 | </head> |
7 | <body> | 8 | <body> |
8 | <div id="app"></div> | 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 | </body> | 12 | </body> |
10 | </html> | 13 | </html> |