-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.dev.js
77 lines (70 loc) · 2.36 KB
/
webpack.dev.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
73
74
75
76
77
const merge = require('webpack-merge') // eslint-disable-line import/no-extraneous-dependencies
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') // eslint-disable-line import/no-extraneous-dependencies
const common = require('./webpack.common.js')
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
// 'postcss-loader',
'sass-loader',
],
},
],
},
plugins: [
// new BundleAnalyzerPlugin(),
],
devServer: {
host: '0.0.0.0',
port: '8080',
contentBase: './dist',
publicPath: '/',
// Enable history API fallback so HTML5 History API based routing works.
// the index.html page will likely have to be served in place of any 404 responses.
historyApiFallback: true,
// inline: true,//è il default...
proxy: {
'/news': {
target: 'https://reporter.5t.torino.it',
pathRewrite: { '^/news': '/ws/publish.php?ch=11' },
changeOrigin: true,
},
'/notiziario': {
target: 'https://www.muoversinpiemonte.it',
changeOrigin: true, // da usare quando si proxa su un named virtual host!
},
'/wp-json': {
target: 'http://wpmip.5t.torino.it',
changeOrigin: true, // da usare quando si proxa su un named virtual host!
},
'/wp-images': {
target: 'http://wpmip.5t.torino.it',
pathRewrite: { '^/wp-images': '/wp-content/uploads' },
changeOrigin: true, // da usare quando si proxa su un named virtual host!
},
'/meteoarpa': {
// target: 'https://dsml3n16i9.execute-api.eu-west-1.amazonaws.com',
target: 'https://i0b1qnp3za.execute-api.eu-west-1.amazonaws.com',
// pathRewrite: { '^/meteoarpa': '/v1/mipArpaScrape' },
pathRewrite: { '^/meteoarpa': '/prod/getForecast' },
changeOrigin: true,
},
'/voli-caselle': {
target: 'https://pwfo8ijf7h.execute-api.eu-west-1.amazonaws.com',
pathRewrite: { '^/voli-caselle': '/default/mipCaselleScrape' },
changeOrigin: true,
},
'/colli': {
target: 'http://docker1.5t.torino.it:90',
pathRewrite: { '^/colli': '/api/index.php' },
},
'/suggest': 'http://geococker:8082/',
},
},
});