🐛 Ajout d'un proxy de dev pour polyfill.io
parent
4962ba470c
commit
a23c2e77e5
|
@ -1,6 +1,7 @@
|
|||
const express = require('express')
|
||||
const webpack = require('webpack')
|
||||
const webpackDevMiddleware = require('webpack-dev-middleware')
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware')
|
||||
|
||||
const app = express()
|
||||
const config = require('./webpack.dev.js')
|
||||
|
@ -22,6 +23,14 @@ app.get('/', function (req, res) {
|
|||
</ul>`)
|
||||
})
|
||||
|
||||
app.use(
|
||||
createProxyMiddleware('/polyfill.io', {
|
||||
target: 'https://polyfill.io',
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^/polyfill.io': '' },
|
||||
})
|
||||
)
|
||||
|
||||
app.use(
|
||||
history({
|
||||
rewrites: ['infrance', 'mon-entreprise', 'publicodes'].map(rewrite),
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
"@babel/runtime": "^7.3.4",
|
||||
"@icons/material": "^0.4.1",
|
||||
"@internationalized/number": "^3.0.3",
|
||||
"@juggle/resize-observer": "^3.3.1",
|
||||
"@mui/material": "^5.0.4",
|
||||
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
|
||||
"@react-aria/button": "^3.3.4",
|
||||
|
@ -163,6 +162,7 @@
|
|||
"file-loader": "^1.1.11",
|
||||
"html-loader": "^0.5.5",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"http-proxy-middleware": "^2.0.2",
|
||||
"http-server": "^0.11.1",
|
||||
"i18next-parser": "^3.3.0",
|
||||
"isomorphic-fetch": "^2.2.1",
|
||||
|
|
32
yarn.lock
32
yarn.lock
|
@ -1455,11 +1455,6 @@
|
|||
"@types/yargs" "^16.0.0"
|
||||
chalk "^4.0.0"
|
||||
|
||||
"@juggle/resize-observer@^3.3.1":
|
||||
version "3.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.3.1.tgz#b50a781709c81e10701004214340f25475a171a0"
|
||||
integrity sha512-zMM9Ds+SawiUkakS7y94Ymqx+S0ORzpG3frZirN3l+UlXUmSUR7hF4wxCVqW+ei94JzV5kt0uXBcoOEAuiydrw==
|
||||
|
||||
"@mui/base@5.0.0-alpha.58":
|
||||
version "5.0.0-alpha.58"
|
||||
resolved "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.58.tgz"
|
||||
|
@ -2561,6 +2556,13 @@
|
|||
"@types/react" "*"
|
||||
hoist-non-react-statics "^3.3.0"
|
||||
|
||||
"@types/http-proxy@^1.17.8":
|
||||
version "1.17.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.8.tgz#968c66903e7e42b483608030ee85800f22d03f55"
|
||||
integrity sha512-5kPLG5BKpWYkw/LVOGWpiq3nEVqxiN32rTgI53Sk12/xHFQ2rG3ehI9IO+O3W2QoKeyB92dJkoka8SUm6BX1pA==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/iframe-resizer@^3.5.7":
|
||||
version "3.5.9"
|
||||
resolved "https://registry.npmjs.org/@types/iframe-resizer/-/iframe-resizer-3.5.9.tgz"
|
||||
|
@ -7895,7 +7897,18 @@ http-proxy-middleware@^0.18.0:
|
|||
lodash "^4.17.5"
|
||||
micromatch "^3.1.9"
|
||||
|
||||
http-proxy@^1.16.2, http-proxy@^1.8.1:
|
||||
http-proxy-middleware@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.2.tgz#94d7593790aad6b3de48164f13792262f656c332"
|
||||
integrity sha512-XtmDN5w+vdFTBZaYhdJAbMqn0DP/EhkUaAeo963mojwpKMMbw6nivtFKw07D7DDOH745L5k0VL0P8KRYNEVF/g==
|
||||
dependencies:
|
||||
"@types/http-proxy" "^1.17.8"
|
||||
http-proxy "^1.18.1"
|
||||
is-glob "^4.0.1"
|
||||
is-plain-obj "^3.0.0"
|
||||
micromatch "^4.0.2"
|
||||
|
||||
http-proxy@^1.16.2, http-proxy@^1.18.1, http-proxy@^1.8.1:
|
||||
version "1.18.1"
|
||||
resolved "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz"
|
||||
integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==
|
||||
|
@ -8483,6 +8496,11 @@ is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
|
|||
resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz"
|
||||
integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
|
||||
|
||||
is-plain-obj@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7"
|
||||
integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==
|
||||
|
||||
is-plain-object@^2.0.3, is-plain-object@^2.0.4:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz"
|
||||
|
@ -9835,7 +9853,7 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.9:
|
|||
snapdragon "^0.8.1"
|
||||
to-regex "^3.0.2"
|
||||
|
||||
micromatch@^4.0.4:
|
||||
micromatch@^4.0.2, micromatch@^4.0.4:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz"
|
||||
integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==
|
||||
|
|
Loading…
Reference in New Issue