From 8285a485849acdb2a84aedd6381e4b53ee45e446 Mon Sep 17 00:00:00 2001 From: ZYSzys <17367077526@163.com> Date: Sun, 16 Dec 2018 16:27:52 +0800 Subject: [PATCH] chore: use cjs instead of esm for consistency --- packages/gatsby/src/utils/js-chunk-names.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gatsby/src/utils/js-chunk-names.js b/packages/gatsby/src/utils/js-chunk-names.js index 32fc400b99745..0b41ab8cacd6f 100644 --- a/packages/gatsby/src/utils/js-chunk-names.js +++ b/packages/gatsby/src/utils/js-chunk-names.js @@ -1,4 +1,4 @@ -import _ from "lodash" +const { kebabCase } = require(`lodash`) const path = require(`path`) const kebabHash = require(`kebab-hash`) const { store } = require(`../redux`) @@ -15,7 +15,7 @@ const generateComponentChunkName = componentPath => { directory = program.directory } const name = path.relative(directory, componentPath) - return `component---${_.kebabCase(name)}` + return `component---${kebabCase(name)}` } exports.generatePathChunkName = generatePathChunkName