Skip to content

Commit

Permalink
Fix build failure caused by mapbox-gl
Browse files Browse the repository at this point in the history
  • Loading branch information
huy-nguyen committed Mar 25, 2020
1 parent a8db825 commit 79c3642
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ const path = require('path')
const { createFilePath } = require('gatsby-source-filesystem')
const { fmImagesToRelative } = require('gatsby-remark-relative-images')

exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => {
if (stage === 'build-html') {
actions.setWebpackConfig({
module: {
rules: [
{
test: /mapbox-gl/,
use: loaders.null(),
},
],
},
})
}
}

exports.createPages = ({ actions, graphql }) => {
const { createPage } = actions

Expand Down

0 comments on commit 79c3642

Please sign in to comment.