Skip to content

Commit

Permalink
Merge pull request #18 from pauleramirez/final-build
Browse files Browse the repository at this point in the history
add graphql plugin
  • Loading branch information
njfleming authored Apr 23, 2021
2 parents 994f957 + dbe5acd commit 4180a68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,5 @@
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"webpack-node-externals": "^1.7.2"
},
"resolutions": {
"graphql-language-service-interface": "2.8.2",
"graphql-language-service-parser": "1.9.0"
}
}
15 changes: 11 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CspHtmlWebpackPlugin = require("csp-html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin;

module.exports = {
target: "web",
Expand Down Expand Up @@ -42,7 +42,10 @@ module.exports = {
},
{
test: /\.css$/,
include: [path.resolve(__dirname, "src"), path.resolve(__dirname, "node_modules")],
include: [
path.resolve(__dirname, "src"),
path.resolve(__dirname, "node_modules"),
],
use: [MiniCssExtractPlugin.loader, "css-loader"],
resolve: {
extensions: [".css"],
Expand Down Expand Up @@ -84,7 +87,11 @@ module.exports = {
// set to true to display bundle breakdown
new BundleAnalyzerPlugin({
openAnalyzer: false,
analyzerMode: 'static'
analyzerMode: "static",
}),
new webpack.ContextReplacementPlugin(
/graphql-language-service-interface[\/\\]dist/,
/\.js$/
),
],
};

0 comments on commit 4180a68

Please sign in to comment.