Skip to content

Commit

Permalink
chore: use cjs instead of esm for consistency (gatsbyjs#10494)
Browse files Browse the repository at this point in the history
Use cjs instead of esm for consistency in `packages/gatsby/src/utils/js-chunk-names.js`
<!--
  Q. Which branch should I use for my pull request?
  A. Your best bet is to go for `master`. If you are unsure, ask in the PR, and a Gatsby maintainer will be happy to help :)

  Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2.

  Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/
-->
  • Loading branch information
ZYSzys authored and gpetrioli committed Jan 22, 2019
1 parent b2016f7 commit 0ed343b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby/src/utils/js-chunk-names.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _ from "lodash"
const { kebabCase } = require(`lodash`)
const path = require(`path`)
const kebabHash = require(`kebab-hash`)
const { store } = require(`../redux`)
Expand All @@ -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
Expand Down

0 comments on commit 0ed343b

Please sign in to comment.