Open chrisvfritz opened 8 years ago
The Vue.js boilerplate worked great on the website, but the downloaded package.json was missing some dependencies and the Webpack config needed to be tweaked a little in order for npm run start to work. Here's the diff I used to get it working:
package.json
npm run start
diff --git a/package.json b/package.json diff --git a/package.json b/package.json old mode 100755 new mode 100644 index d63638b..d55bbad --- a/package.json +++ b/package.json @@ -9,14 +9,19 @@ "vue": "1.0.18" }, "devDependencies": { - "html-webpack-plugin": "1.6.1", - "webpack-dev-server": "1.14.1", - "webpack": "1.12.13", "babel-loader": "6.2.4", + "babel-plugin-transform-runtime": "^6.9.0", "babel-preset-es2015": "6.6.0", "babel-preset-stage-0": "6.5.0", - "vue-loader": "8.2.1" + "css-loader": "^0.23.1", + "html-webpack-plugin": "1.6.1", + "vue-hot-reload-api": "^2.0.1", + "vue-html-loader": "^1.2.2", + "vue-loader": "8.2.1", + "vue-style-loader": "^1.0.0", + "webpack": "1.12.13", + "webpack-dev-server": "1.14.1" }, "author": "WebpackBin", "license": "ISC" -} \ No newline at end of file +} diff --git a/src/index.tpl.html b/src/index.tpl.html deleted file mode 100755 index b7d248b..0000000 --- a/src/index.tpl.html +++ /dev/null @@ -1,12 +0,0 @@ -<!doctype html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <meta http-equiv="x-ua-compatible" content="ie=edge"> - <title>WebpackBin project</title> - <meta name="viewport" content="width=device-width, initial-scale=1"> - </head> - <body> - <div id="app"></div> - </body> -</html> diff --git a/webpack.config.js b/webpack.config.js index 649e641..2e4e84e 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -31,7 +31,7 @@ module.exports = { }, plugins: [ new HtmlWebpackPlugin({ - template: path.resolve('src', 'index.tpl.html'), + template: path.resolve('src', 'index.html'), inject: 'body', filename: 'index.html' })
The Vue.js boilerplate worked great on the website, but the downloaded
package.json
was missing some dependencies and the Webpack config needed to be tweaked a little in order fornpm run start
to work. Here's the diff I used to get it working: