Skip to content

Instantly share code, notes, and snippets.

@aderaaij
Created February 1, 2018 17:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aderaaij/591f80561bbc85996b4e767d4b478c65 to your computer and use it in GitHub Desktop.
Save aderaaij/591f80561bbc85996b4e767d4b478c65 to your computer and use it in GitHub Desktop.
A minimal webpack config for vuejs
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