Skip to content

Commit 64f7220

Browse files
committed
Revert "add plugins to webpack dev bundle (#3403)"
This reverts commit d67d11d.
1 parent d67d11d commit 64f7220

File tree

3 files changed

+9
-33
lines changed

3 files changed

+9
-33
lines changed

packages/graphiql/resources/index.html.ejs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This source code is licensed under the license found in the
66
* LICENSE file in the root directory of this source tree.
77
-->
8-
<!doctype html>
8+
<!DOCTYPE html>
99
<html lang="en">
1010
<head>
1111
<title>GraphiQL</title>
@@ -28,30 +28,20 @@
2828
If you do not want to rely on a CDN, you can host these files locally or
2929
include them directly in your favored resource bundler.
3030
-->
31-
<script
32-
crossorigin
33-
src="https://unpkg.com/react@18/umd/react.development.js"
34-
></script>
35-
<script
36-
crossorigin
37-
src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"
38-
></script>
39-
<link rel="stylesheet" href="/plugins/explorer/style.css" />
31+
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
32+
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
33+
4034
<!--
41-
These two files can be found in the npm module, however you may wish to copy
42-
them directly into your environment, or perhaps include them in your favored
43-
resource bundler. -->
35+
These two files can be found in the npm module, however you may wish to
36+
copy them directly into your environment, or perhaps include them in your
37+
favored resource bundler.
38+
-->
4439
</head>
4540
<body>
4641
<div id="graphiql">Loading...</div>
4742
<script type="application/javascript">
4843
window.GraphQLVersion = <%= htmlWebpackPlugin.options.graphqlVersion %>
4944
</script>
50-
<script
51-
defer
52-
src="/plugins/explorer/index.umd.js"
53-
type="application/javascript"
54-
></script>
5545
<script
5646
defer
5747
src="/resources/renderExample.js"

packages/graphiql/resources/renderExample.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function getSchemaUrl() {
8383
// how you can customize GraphiQL by providing different values or
8484
// additional child elements.
8585
const root = ReactDOM.createRoot(document.getElementById('graphiql'));
86-
const explorerPlugin = window.GraphiQLPluginExplorer.explorerPlugin();
86+
8787
root.render(
8888
React.createElement(GraphiQL, {
8989
fetcher: GraphiQL.createFetcher({
@@ -102,6 +102,5 @@ root.render(
102102
shouldPersistHeaders: true,
103103
inputValueDeprecation: GraphQLVersion.includes('15.5') ? undefined : true,
104104
onTabChange,
105-
plugins: [explorerPlugin],
106105
}),
107106
);

packages/graphiql/test/beforeDevServer.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ const path = require('node:path');
1010
const { createHandler } = require('graphql-http/lib/use/express');
1111
const schema = require('./schema');
1212
const { schema: badSchema } = require('./bad-schema');
13-
const { readdirSync } = require('node:fs');
14-
15-
const plugins = readdirSync(path.join(__dirname, '../../'))
16-
.filter(
17-
p => p.startsWith('graphiql-plugin-') && p !== 'graphiql-plugin-utils',
18-
)
19-
.map(p => ({ path: p, pluginName: p.replace('graphiql-plugin-', '') }));
2013

2114
module.exports = function beforeDevServer(app, _server, _compiler) {
2215
// GraphQL Server
@@ -34,10 +27,4 @@ module.exports = function beforeDevServer(app, _server, _compiler) {
3427
'/resources/renderExample.js',
3528
express.static(path.join(__dirname, '../resources/renderExample.js')),
3629
);
37-
for (const plugin of plugins) {
38-
app.use(
39-
`/plugins/${plugin.pluginName}/`,
40-
express.static(path.join(__dirname, `../../${plugin.path}/dist/`)),
41-
);
42-
}
4330
};

0 commit comments

Comments
 (0)