Faker needs proper webpack loader #1018
-
Hi. Recently tried to install faker.js and started getting this error: Cannot find anywhere how to create webpack loader for mjs files. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 4 replies
-
Please note that this is not a direct issue in faker, but a missing configuration in (your) webpack.
|
Beta Was this translation helpful? Give feedback.
-
Hey @DmitriiLinkSquares, I created a vue-cli webpack project in our playground: https://github.com/faker-js/playground/tree/main/playgrounds/webpack-cjs and at least this one works as expected for now 🤔 |
Beta Was this translation helpful? Give feedback.
-
I couldn't figure this out for my use-case (testing a React app in Cypress) and reverted to |
Beta Was this translation helpful? Give feedback.
-
I've also been running into this issue with my environment, which is Next.js, Cypress, and Faker. I created a simple example of this issue and submitted it to the playground repo: faker-js/playground#4
|
Beta Was this translation helpful? Give feedback.
-
I dug through the Cypress 10 changes and didn't find anything particularly obvious that would have caused this bug with Faker, but way back in Cypress 5 I found this change:
-- source That combined with the fact that Cypress switched from a fixed |
Beta Was this translation helpful? Give feedback.
-
Finally someone made a helpful reproduction and this is not even directly related to webpack But with that we got new helpful insights |
Beta Was this translation helpful? Give feedback.
-
I think this was resolved in #1085 . Can we close this? |
Beta Was this translation helpful? Give feedback.
I think this was resolved in #1085 . Can we close this?