Upgrade to Create-React-App 2
This commit is contained in:
parent
895c86b61a
commit
397f8281a0
3 changed files with 9413 additions and 4726 deletions
14108
package-lock.json
generated
14108
package-lock.json
generated
File diff suppressed because it is too large
Load diff
21
package.json
21
package.json
|
|
@ -4,9 +4,9 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"faunadb": "^2.5.2",
|
"faunadb": "^2.5.2",
|
||||||
"react": "^16.4.0",
|
"react": "^16.5.2",
|
||||||
"react-dom": "^16.4.0",
|
"react-dom": "^16.5.2",
|
||||||
"react-scripts": "1.1.4"
|
"react-scripts": "2.0.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "node ./scripts/bootstrap-fauna-database.js",
|
"bootstrap": "node ./scripts/bootstrap-fauna-database.js",
|
||||||
|
|
@ -22,16 +22,15 @@
|
||||||
"test": "react-scripts test --env=jsdom"
|
"test": "react-scripts test --env=jsdom"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"http-proxy-middleware": "^0.19.0",
|
||||||
"markdown-magic": "^0.1.23",
|
"markdown-magic": "^0.1.23",
|
||||||
"netlify-lambda": "^0.4.0",
|
"netlify-lambda": "^0.4.0",
|
||||||
"npm-run-all": "^4.1.3"
|
"npm-run-all": "^4.1.3"
|
||||||
},
|
},
|
||||||
"proxy": {
|
"browserslist": [
|
||||||
"/.netlify/functions": {
|
">0.2%",
|
||||||
"target": "http://localhost:9000",
|
"not dead",
|
||||||
"pathRewrite": {
|
"not ie <= 11",
|
||||||
"^/\\.netlify/functions": ""
|
"not op_mini all"
|
||||||
}
|
]
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
src/setupProxy.js
Normal file
10
src/setupProxy.js
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
const proxy = require('http-proxy-middleware');
|
||||||
|
|
||||||
|
module.exports = function(app) {
|
||||||
|
app.use(proxy('/.netlify/functions/', {
|
||||||
|
target: 'http://localhost:9000/',
|
||||||
|
"pathRewrite": {
|
||||||
|
"^/\\.netlify/functions": ""
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue