add web pack build fix
This commit is contained in:
parent
be9f676de6
commit
55f2fc378c
2 changed files with 12 additions and 1 deletions
|
|
@ -11,7 +11,7 @@
|
|||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"bootstrap": "node ./init-faunadb.js",
|
||||
"buildFunctions": "netlify-lambda build functions",
|
||||
"buildFunctions": "netlify-lambda build functions -c ./webpack.config.js",
|
||||
"build": "npm run buildFunctions && react-scripts build",
|
||||
"test": "react-scripts test --env=jsdom",
|
||||
"eject": "react-scripts eject"
|
||||
|
|
|
|||
11
webpack.config.js
Normal file
11
webpack.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
var webpack = require("webpack");
|
||||
|
||||
/* fix for https://medium.com/@danbruder/typeerror-require-is-not-a-function-webpack-faunadb-6e785858d23b */
|
||||
module.exports = {
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({ "global.GENTLY": false })
|
||||
],
|
||||
node: {
|
||||
__dirname: true,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue