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