From 1960f6b280db1a782a50bf0676dc19570bcabda3 Mon Sep 17 00:00:00 2001 From: mitra-deriv <64970259+mitra-deriv@users.noreply.github.com> Date: Tue, 30 Jan 2024 17:06:09 +0800 Subject: [PATCH] fix: :bug: add slash for path to redirect (#6875) --- gatsby-node.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index 88ff0b4c9a1..94220e8c1e1 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -81,7 +81,7 @@ const BuildPage = (page, actions) => { }) createRedirect({ fromPath: `/contact-us`, - toPath: `/contact_us`, + toPath: `/contact_us/`, redirectInBrowser: true, isPermanent: true, }) @@ -423,19 +423,23 @@ exports.onCreateWebpackConfig = ({ stage, actions, loaders, getConfig }, { ...op usedExports: true, }, plugins: [ - new StylelintPlugin({...style_lint_options, ...options}), - new webpack.optimize.LimitChunkCountPlugin({maxChunks: 1}), + new StylelintPlugin({ ...style_lint_options, ...options }), + new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }), ], resolve: { modules: [path.resolve(__dirname, 'src'), 'node_modules'], }, - ...((stage === 'build-html' || stage === 'develop-html') ? { - module: { - rules: [{ - test: /analytics/, - use: loaders.null() - }] - } - } : {}), + ...(stage === 'build-html' || stage === 'develop-html' + ? { + module: { + rules: [ + { + test: /analytics/, + use: loaders.null(), + }, + ], + }, + } + : {}), }) -} \ No newline at end of file +}