Created
November 14, 2017 23:28
-
-
Save csclyde/daec3c9053b5e1226b3148b971972bb4 to your computer and use it in GitHub Desktop.
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
var path = require('path') | |
var webpack = require('webpack') | |
var combineLoaders = require('webpack-combine-loaders') | |
module.exports = { | |
entry: './src/vue/main.js', | |
output: { | |
path: path.resolve(__dirname, './web/dist'), | |
publicPath: '/web/dist/', | |
filename: 'bundle.js' | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.vue$/, | |
loader: 'vue-loader', | |
options: { | |
loaders: { | |
} | |
// other vue-loader options go here | |
} | |
}, | |
{ | |
test: /\.js$/, | |
loader: 'babel-loader', | |
exclude: /node_modules/, | |
query: { | |
presets: ["es2015", 'stage-0'], | |
plugins: ['transform-runtime'] | |
} | |
}, | |
{ | |
test: /\.(png|jpg|gif|svg)$/, | |
loader: 'file-loader', | |
options: { | |
name: '[name].[ext]?[hash]' | |
} | |
} | |
] | |
}, | |
vue: { | |
loaders: { | |
js: combineLoaders([ | |
{ | |
loader: 'babel-loader', | |
query: { | |
presets: ['es2015', 'stage-2'], | |
plugins: ['transform-runtime'] | |
} | |
} | |
]) | |
} | |
}, | |
resolve: { | |
alias: { | |
vue: 'vue/dist/vue.js' | |
}, | |
extensions: ['', '.js', '.vue'], | |
root: [ | |
path.resolve('./') | |
] | |
}, | |
watch: false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment