Skip to content

Cannot find module after install devDependency #1135

Closed Answered by Shinigami92
yuniit asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, seems you want to use Faker not for e.g. mocking test data or so
So if you want to use Faker in production bundled code, sure you need to install it as dependency directly

You should think about using it like so:

import { faker } from '@faker-js/faker/locale/en';

Because this will reduce bundle size from ~4 MiB to ~600 KiB

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yuniit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants