Created
January 7, 2019 13:02
-
-
Save apalyukha/3423b3936f297824f9a47eef19b891e3 to your computer and use it in GitHub Desktop.
Spring Boot REST: add webpack
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 VueLoaderPlugin = require('vue-loader/lib/plugin'); | |
module.exports = { | |
mode: 'development', | |
devtool: 'source-map', | |
entry: path.join(__dirname, 'src', 'main', 'resources', 'static', 'js', 'main.js'), | |
devServer: { | |
contentBase: './dist', | |
compress: true, | |
port: 8000, | |
allowedHosts: [ | |
'localhost:9000' | |
] | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /(node_modules|bower_components)/, | |
use: { | |
loader: 'babel-loader', | |
options: { | |
presets: ['@babel/preset-env'] | |
} | |
} | |
}, | |
{ | |
test: /\.vue$/, | |
loader: 'vue-loader' | |
} | |
] | |
}, | |
plugins: [ | |
new VueLoaderPlugin() | |
], | |
resolve: { | |
modules: [ | |
path.join(__dirname, 'src', 'main', 'resources', 'static', 'js'), | |
path.join(__dirname, 'node_modules'), | |
], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment