fix: use lodash-es in the client (#41931)

This commit is contained in:
Oliver Eyton-Williams
2021-04-28 23:11:20 +02:00
committed by GitHub
parent db369fbed1
commit 9be2fb9a10
37 changed files with 95 additions and 43 deletions

View File

@ -2,6 +2,8 @@ const env = require('../config/env');
const webpack = require('webpack');
const { createFilePath } = require('gatsby-source-filesystem');
// TODO: ideally we'd remove lodash and just use lodash-es, but we can't require
// es modules here.
const uniq = require('lodash/uniq');
const { blockNameify } = require('../utils/block-nameify');
@ -231,10 +233,6 @@ exports.onCreateBabelConfig = ({ actions }) => {
'@freecodecamp/react-bootstrap': {
transform: '@freecodecamp/react-bootstrap/lib/${member}',
preventFullImport: true
},
lodash: {
transform: 'lodash/${member}',
preventFullImport: true
}
}
});