Merge branch 'feature-upgrade-to-CRA-2'
This commit is contained in:
commit
6268e75b16
5 changed files with 16763 additions and 14 deletions
16738
package-lock.json
generated
Normal file
16738
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
23
package.json
23
package.json
|
|
@ -3,10 +3,10 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"faunadb": "^0.2.2",
|
||||
"react": "^16.4.0",
|
||||
"react-dom": "^16.4.0",
|
||||
"react-scripts": "1.1.4"
|
||||
"faunadb": "^2.5.2",
|
||||
"react": "^16.5.2",
|
||||
"react-dom": "^16.5.2",
|
||||
"react-scripts": "2.0.4"
|
||||
},
|
||||
"scripts": {
|
||||
"bootstrap": "node ./scripts/bootstrap-fauna-database.js",
|
||||
|
|
@ -22,16 +22,15 @@
|
|||
"test": "react-scripts test --env=jsdom"
|
||||
},
|
||||
"devDependencies": {
|
||||
"http-proxy-middleware": "^0.19.0",
|
||||
"markdown-magic": "^0.1.23",
|
||||
"netlify-lambda": "^0.4.0",
|
||||
"npm-run-all": "^4.1.3"
|
||||
},
|
||||
"proxy": {
|
||||
"/.netlify/functions": {
|
||||
"target": "http://localhost:9000",
|
||||
"pathRewrite": {
|
||||
"^/\\.netlify/functions": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
"browserslist": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not ie <= 11",
|
||||
"not op_mini all"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -324,5 +324,6 @@ function getTodoId(todo) {
|
|||
if (!todo.ref) {
|
||||
return null
|
||||
}
|
||||
return todo.ref['@ref'].split('/').pop()
|
||||
console.log(todo)
|
||||
return todo.ref['@ref'].id.split('/').pop()
|
||||
}
|
||||
|
|
|
|||
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": ""
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
var webpack = require("webpack");
|
||||
// This is needed until netlify-lambda upgrades to webpack4
|
||||
var webpack = require("./node_modules/netlify-lambda/node_modules/webpack");
|
||||
|
||||
/* fix for https://medium.com/@danbruder/typeerror-require-is-not-a-function-webpack-faunadb-6e785858d23b */
|
||||
module.exports = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue