-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
50 lines (41 loc) · 1.19 KB
/
Copy pathwebpack.dev.js
File metadata and controls
50 lines (41 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const path = require('path');
const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const KotlinWebpackPlugin = require('@jetbrains/kotlin-webpack-plugin');
module.exports = merge(common, {
mode: 'development',
output: {
filename: 'js/[name].js',
},
plugins: [
new KotlinWebpackPlugin({
src: path.join(__dirname, 'main'),
verbose: true,
librariesAutoLookup: true
}),
new MiniCssExtractPlugin({
filename: 'css/[name].css',
}),
new HtmlWebpackPlugin({
template: './asset/index.html'
}),
new webpack.HotModuleReplacementPlugin(),
],
devtool: 'source-map',
devServer: {
port: 8080,
disableHostCheck: true,
historyApiFallback: true,
hot: true,
proxy: {
'/api/': {
target: 'http://localhost:8081/api',
secure: false,
prependPath: false
}
}
}
});