Skip to content

Commit dbe5acd

Browse files
committed
add graphql plugin
1 parent 31e565c commit dbe5acd

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,5 @@
434434
"webpack-cli": "^3.3.12",
435435
"webpack-dev-server": "^3.11.0",
436436
"webpack-node-externals": "^1.7.2"
437-
},
438-
"resolutions": {
439-
"graphql-language-service-interface": "2.8.2",
440-
"graphql-language-service-parser": "1.9.0"
441437
}
442438
}

webpack.config.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ const path = require("path");
22
const HtmlWebpackPlugin = require("html-webpack-plugin");
33
const CspHtmlWebpackPlugin = require("csp-html-webpack-plugin");
44
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
5-
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
6-
5+
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
6+
.BundleAnalyzerPlugin;
77

88
module.exports = {
99
target: "web",
@@ -42,7 +42,10 @@ module.exports = {
4242
},
4343
{
4444
test: /\.css$/,
45-
include: [path.resolve(__dirname, "src"), path.resolve(__dirname, "node_modules")],
45+
include: [
46+
path.resolve(__dirname, "src"),
47+
path.resolve(__dirname, "node_modules"),
48+
],
4649
use: [MiniCssExtractPlugin.loader, "css-loader"],
4750
resolve: {
4851
extensions: [".css"],
@@ -84,7 +87,11 @@ module.exports = {
8487
// set to true to display bundle breakdown
8588
new BundleAnalyzerPlugin({
8689
openAnalyzer: false,
87-
analyzerMode: 'static'
90+
analyzerMode: "static",
8891
}),
92+
new webpack.ContextReplacementPlugin(
93+
/graphql-language-service-interface[\/\\]dist/,
94+
/\.js$/
95+
),
8996
],
9097
};

0 commit comments

Comments
 (0)