Created
December 7, 2018 07:01
-
-
Save orekyuu/906972be05e2be8788d9c58692bc8d5f to your computer and use it in GitHub Desktop.
inside
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 path = require('path'); | |
const webpack = require('webpack'); | |
const VueLoaderPlugin = require('vue-loader/lib/plugin'); | |
module.exports = { | |
entry: { | |
hoge: './src/main/js/files/hoge', | |
vendor: ['vue', 'vuex'] | |
}, | |
output: { | |
path: path.resolve(__dirname, 'build', 'classes', 'java', 'main', 'static', 'js'), | |
publicPath: '/js/', | |
filename: '[name].js' | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.vue$/, | |
loader: 'vue-loader', | |
}, | |
{ | |
test: /\.(css|sass|scss)$/, | |
use: [ | |
'vue-style-loader', | |
'css-loader', | |
'sass-loader' | |
] | |
}, | |
{ | |
test: /\.js$/, | |
loader: 'babel-loader', | |
options: { | |
presets: [ | |
'@babel/preset-env', | |
] | |
} | |
} | |
] | |
}, | |
optimization: { | |
splitChunks: { | |
name: 'vendor', | |
chunks: 'initial', | |
} | |
}, | |
plugins: [ | |
new VueLoaderPlugin() | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment