Skip to content

Instantly share code, notes, and snippets.

@drucoder
Created September 6, 2018 17:01
Show Gist options
  • Save drucoder/120659207c2ea2e53fd64e1fbb014dab to your computer and use it in GitHub Desktop.
Save drucoder/120659207c2ea2e53fd64e1fbb014dab to your computer and use it in GitHub Desktop.
Spring Boot REST: добавляем webpack
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