Created
June 13, 2018 16:18
-
-
Save tpitre/85fc2f882faea93f06c522c7ca641865 to your computer and use it in GitHub Desktop.
Simple Vue Webpack Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// webpack.config.js | |
const path = require('path'); | |
const {VueLoaderPlugin} = require('vue-loader'); | |
module.exports = { | |
entry: { | |
bundle: './app/src/index.js' | |
}, | |
output: { | |
filename: '[name].js', | |
path: path.resolve(__dirname, './app/dist/'), | |
publicPath: path.resolve(__dirname, './app/dist/') | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: path.resolve(__dirname, '/node_modules/'), | |
use: { | |
loader: 'babel-loader' | |
}, | |
}, | |
{ | |
test: /\.vue$/, | |
loader: 'vue-loader' | |
} | |
] | |
}, | |
resolve: { | |
alias: { | |
'vue$': 'vue/dist/vue.esm.js' | |
}, | |
extensions: ['*', '.js', '.vue', '.json'] | |
}, | |
plugins: [new VueLoaderPlugin()] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment