diff --git a/.gitignore b/.gitignore index 6c2b3bfdb2..a416849bda 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ npm-debug.log *.swp *.swo *.log -test/dist \ No newline at end of file +test/dist/ diff --git a/build/webpack.config.js b/build/webpack.config.js index 8a214218e2..2c2f424cc5 100644 --- a/build/webpack.config.js +++ b/build/webpack.config.js @@ -15,7 +15,7 @@ module.exports = { }, // 输出 output: { - path: path.join(__dirname, '.././test/dist'), + path: path.join(__dirname, '../test/dist'), publicPath: '/test/dist/', filename: '[name].js', chunkFilename: '[name].chunk.js' @@ -38,7 +38,7 @@ module.exports = { "style-loader", "css-loader?sourceMap", { - publicPath: "../test/dist/" + publicPath: "/test/dist/" } ), less: ExtractTextPlugin.extract( @@ -64,9 +64,9 @@ module.exports = { new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库 new HtmlWebpackPlugin({ // 构建html文件 - filename: '../../test/index.html', - template: './test/template/index.html', + filename: 'index.html', + template: './test/index.html', inject: 'body' }) ] -}; \ No newline at end of file +}; diff --git a/package.json b/package.json index 25e57e9e79..9db72ca0dc 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "main": "src/index.js", "scripts": { "init": "webpack --progress --config build/webpack.config.js", - "dev": "webpack-dev-server --content-base test --inline --hot --compress --history-api-fallback --port 8081 --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", "build": "gulp --gulpfile build/build-style.js" }, "repository": { diff --git a/test/components/app.vue b/test/app.vue similarity index 75% rename from test/components/app.vue rename to test/app.vue index b697d96fdd..7c7fa7b664 100644 --- a/test/components/app.vue +++ b/test/app.vue @@ -1,6 +1,6 @@