Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

is-plain-object require not working with webpack #80

Open
jamesbattersby opened this issue Aug 18, 2020 · 0 comments
Open

is-plain-object require not working with webpack #80

jamesbattersby opened this issue Aug 18, 2020 · 0 comments

Comments

@jamesbattersby
Copy link

I'm using 5.0.3 in a project using webpack, and I've found an issue with importing is-plain-object in loader.js.

const isPlainObject = require('is-plain-object')

isPlainOject ends up being a module rather than a function, so is not callable and this causes failures later on. I've worked around the problem by adding .default - but I guess this won't work for everyone.

I think this only became problem after 3.0.0 of is-plain-object. Maybe there is a setting in webpack I can use to get around this, but I'm not aware of one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant