Skip to content

Instantly share code, notes, and snippets.

@tmyers273
Last active July 13, 2017 00:53
Show Gist options
  • Save tmyers273/1d0a020fcf61aaa13df8eda0fce702d9 to your computer and use it in GitHub Desktop.
Save tmyers273/1d0a020fcf61aaa13df8eda0fce702d9 to your computer and use it in GitHub Desktop.
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: path.resolve(__dirname, '../src/index.js'),
output: {
path: path.resolve(__dirname, '../dist'),
publicPath: '/dist/',
filename: 'index.js',
libraryTarget: 'umd'
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
}
]
},
externals: {
vue: 'vue'
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
},
devtool: '#source-map',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment