Closed daugsbi closed 3 years ago
Tried your solution, but it's breaking SSR injection
@creotip Did you get an error?
You probably need to build the plugin first, because the generated js files are not in the repository itself
cd node_modules/gatsby-plugin-material-ui
yarn install --frozen-lockfile
yarn run build
Getting the same error: warning WebpackError: Unsafe builtin usage fs.existsSync
Any updates on this? I can support in testing if needed. We're trying to upgrade to Gatsby 3 and having the same issue.
To test it, I've used https://gitpkg.now.sh/.
yarn add 'https://gitpkg.now.sh/daugsbi/gatsby-plugin-material-ui/gatsby-plugin-material-ui?master'
If you have a theme, you can add it to resolutions in your package.json:
"resolutions": {
"gatsby-plugin-material-ui": "https://gitpkg.now.sh/daugsbi/gatsby-plugin-material-ui/gatsby-plugin-material-ui?master",
}
Then I've manually build it in the package folder, because the final js files are not part of the repository:
cd node_modules/gatsby-plugin-material-ui
yarn install --frozen-lockfile
yarn run build
Let me know if this works
Tested it and works for me!
@hupe1980 Any news on this one? Upgrade node in CircleCI is also necessary
@daugsbi I just updated the node version. Can you update your PR please?
@daugsbi The unittest will run again if you add the following:
// gatsby-plugin-material-ui/package.json
"moduleNameMapper": {
"material-ui-plugin-cache-endpoint": "<rootDir>/src/__tests__/dummy-styles-provider-props.js",
"/package.json": "<rootDir>/src/__tests__/dummy-pkg.json"
}
@daugsbi The e2e tests run on my local pc after I've updated all the dependencies
@hupe1980 Thanks a lot :+1:
Can you fix the e2e tests then?
@daugsbi You just have to run yarn upgrade in the root project to update the yarn.lock.
Yeah, green looks much better :smile:
Thanks for your instant help
Upgraded dependencies to new versions. Load browserslist config from package.json via import instead of node's fs module. Fallback to default config from gatsby.
I couldn't find a way to use .browserslistrc config or gatsby's helper function without reading from the filesystem.
Closes #65