Created
February 1, 2018 17:20
-
-
Save aderaaij/591f80561bbc85996b4e767d4b478c65 to your computer and use it in GitHub Desktop.
A minimal webpack config for vuejs
This file contains hidden or 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
const webpack = require('webpack'); | |
const path = require('path'); | |
module.exports = { | |
entry: './src/main.js', | |
output: { | |
path: path.resolve(__dirname, './build'), | |
filename: 'bundle.js', | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /(node_modules|bower_components)/, | |
use: { | |
loader: 'babel-loader', | |
options: { | |
presets: ['@babel/preset-env'], | |
}, | |
}, | |
}, | |
{ | |
test: /\.vue$/, | |
use: { | |
loader: 'vue-loader', | |
}, | |
}, | |
], | |
}, | |
resolve: { | |
alias: { | |
vue: 'vue/dist/vue.js', | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment