Skip to content

Commit 7df3150

Browse files
committed
fix: enable repalce plugin for graphql client (it crashes on ssr)
1 parent f67b065 commit 7df3150

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

config/webpack.config.server.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,19 @@ module.exports = {
130130
resolve: {
131131
modules: ['node_modules'],
132132
extensions: paths.moduleFileExtensions
133-
.map(ext => `.${ext}`)
134-
.filter(ext => true || !ext.includes('ts')),
133+
.map((ext) => `.${ext}`)
134+
.filter((ext) => true || !ext.includes('ts')),
135135
},
136136
plugins: [
137137
new webpack.DefinePlugin(env.stringified),
138138
new webpack.NormalModuleReplacementPlugin(
139139
/codemirror/,
140140
path.resolve(paths.appSrc, 'lib/replacedModule.ts'),
141141
),
142+
new webpack.NormalModuleReplacementPlugin(
143+
/lib\/graphql\/client/,
144+
path.resolve(paths.appSrc, 'lib/replacedModule.ts'),
145+
),
142146
new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }),
143147
],
144148
optimization: {

0 commit comments

Comments
 (0)