forked from ome/omero-iviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
72 lines (71 loc) · 1.84 KB
/
webpack.dev.config.js
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const {AureliaPlugin} = require('aurelia-webpack-plugin');
const ProvidePlugin = require('webpack/lib/ProvidePlugin');
module.exports = {
mode: "development",
entry: {
main: [
'./src/main'
]
},
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js'
},
performance: {
hints: false
},
plugins: [
new AureliaPlugin({
aureliaApp: undefined,
aureliaConfig: "basic",
features: {svg: false}}),
new ProvidePlugin({
Promise: 'bluebird',
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
}),
new HtmlWebpackPlugin({
template : './src/index-dev.html',
filename: 'index.html'
})],
resolve: {
extensions: [".js"],
modules: ["src", "node_modules"]
},
module: {
rules: [
{ test: /\.js$/, use: {loader: 'babel-loader'}},
{ test: require.resolve('jquery'), use: {
loader: 'expose-loader',
options: {exposes: ["$", "jQuery"]}
}},
{ test: /\.(png|gif|jpg|jpeg)$/, use: {loader: 'file-loader?name=css/images/[name].[ext]' }},
{ test: /\.(woff|woff2)$/, use: {loader: 'file-loader?name=css/fonts/[name].[ext]' }},
{ test: /\.css?$/, use: {loader: 'file-loader?name=css/[name].[ext]' }},
{ test: /\.html$/, use: {loader: 'html-loader' }}
]
},
devServer: {
port: 8080,
proxy: {
'/iviewer': {
target: 'http://127.0.0.1:4080'
},
'/api': {
target: 'http://127.0.0.1:4080'
},
'/webgateway': {
target: 'http://127.0.0.1:4080'
},
'/webclient': {
target: 'http://127.0.0.1:4080'
},
'/static': {
target: 'http://127.0.0.1:4080'
}
}
}
};