Skip to content

Commit

Permalink
Import less Lodash
Browse files Browse the repository at this point in the history
This module imports the entirety of Lodash which is very large. This results in large bundle sizes for anyone consuming this module.

This PR imports only the merge function from Lodash.
  • Loading branch information
leahciMic authored and Michael Leaney committed Nov 9, 2017
1 parent 110f158 commit b923f48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { resolve } = require('path')
const { merge } = require('lodash')
const merge = require('lodash/merge')

export default async function module (moduleOptions) {
// Apply defaults
Expand Down
2 changes: 1 addition & 1 deletion templates/auth.store.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Cookie from 'cookie'
import Cookies from 'js-cookie'
import { kebabCase } from 'lodash'
import kebabCase from 'lodash/kebabCase'

const options = <%= serialize(options) %>
const storageTokenName = kebabCase(options.storageTokenName)
Expand Down

0 comments on commit b923f48

Please sign in to comment.