This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
IcyNet.eu/webpack.common.js
2017-12-04 22:33:44 +02:00

45 lines
872 B
JavaScript

const path = require('path')
module.exports = {
entry: {
main: './src/script/main.js',
admin: './src/script/admin.js'
},
output: {
path: path.join(__dirname, 'build', 'script'),
filename: '[name].js'
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js' // 'vue/dist/vue.common.js' for webpack 1
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [
'env'
],
plugins: [
'transform-es2015-modules-commonjs'
]
}
}
},
{
test: /\.vue$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'vue-loader'
}
}
]
},
plugins: []
}