Skip to content

Commit

Permalink
feat(gatsby-graphiql-explorer): upgrade to webpack 5
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Apr 2, 2021
1 parent e432c23 commit de393cd
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 1,072 deletions.
1 change: 1 addition & 0 deletions packages/gatsby-graphiql-explorer/.gitignore
@@ -1,3 +1,4 @@
/*.js
/*.html
yarn.lock
app.js.LICENSE.txt
16 changes: 8 additions & 8 deletions packages/gatsby-graphiql-explorer/package.json
Expand Up @@ -41,19 +41,19 @@
"babel-preset-gatsby-package": "^1.3.0-next.0",
"core-js": "^3.8.1",
"cross-env": "^7.0.3",
"css-loader": "^1.0.1",
"graphiql": "^1.3.2",
"css-loader": "^5.2.0",
"graphiql": "^1.4.0",
"graphiql-code-exporter": "^3.0.3",
"graphiql-explorer": "^0.6.2",
"html-webpack-plugin": "^3.2.0",
"graphiql-explorer": "^0.6.3",
"html-webpack-plugin": "^5.3.1",
"npm-run-all": "4.1.5",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"regenerator-runtime": "^0.13.7",
"style-loader": "^0.23.1",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"whatwg-fetch": "^3.5.0"
"style-loader": "^2.0.0",
"webpack": "^5.30.0",
"webpack-cli": "^4.6.0",
"whatwg-fetch": "^3.6.2"
},
"engines": {
"node": ">=12.13.0"
Expand Down
8 changes: 3 additions & 5 deletions packages/gatsby-graphiql-explorer/src/app/index.ejs
Expand Up @@ -2,16 +2,14 @@
<html>
<head>
<meta charset="UTF-8" />
<title>GraphiQL</title>
<title>Gatsby - GraphiQL</title>
<meta name="robots" content="noindex" />
<meta name="referrer" content="origin" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<%= htmlWebpackPlugin.tags.headTags %>
</head>
<body>
<div id="root" class="graphiql-container">Loading...</div>
<script
type="text/javascript"
src="/___graphql/<%= htmlWebpackPlugin.files.chunks.main.entry %>?<%= htmlWebpackPlugin.files.chunks.main.hash %>"
></script>
<%= htmlWebpackPlugin.tags.bodyTags %>
</body>
</html>
4 changes: 3 additions & 1 deletion packages/gatsby-graphiql-explorer/src/app/webpack.config.js
Expand Up @@ -9,6 +9,7 @@ module.exports = {
output: {
path: path.join(__dirname, `..`, `..`),
filename: `./app.js`,
publicPath: `/___graphql`,
},
devtool: false,
module: {
Expand All @@ -25,8 +26,9 @@ module.exports = {
{
corejs: 3,
loose: true,
bugfixes: true,
modules: `commonjs`,
useBuiltIns: `usage`,
useBuiltIns: `entry`,
targets: [`>0.25%`, `not dead`],
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-netlify-cms/package.json
Expand Up @@ -14,7 +14,7 @@
"lodash": "^4.17.21",
"mini-css-extract-plugin": "1.3.9",
"netlify-identity-widget": "^1.9.1",
"webpack": "^5.23.00"
"webpack": "^5.23.0"
},
"devDependencies": {
"@babel/cli": "^7.12.17",
Expand Down

0 comments on commit de393cd

Please sign in to comment.