Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React components don't resolve with CRA / webpack 4 #3

Open
walkah opened this issue Jul 2, 2021 · 1 comment
Open

React components don't resolve with CRA / webpack 4 #3

walkah opened this issue Jul 2, 2021 · 1 comment

Comments

@walkah
Copy link
Member

walkah commented Jul 2, 2021

Using create-react-app (with the included webpack 4), trying to add a <SignInButton /> component fails to import:

Module not found: Can't resolve '@fission-suite/kit/components/react' in '/Users/walkah/Projects/fission-suite/blog/src/components'

Relevant code is:

import { SignInButton } from "@fission-suite/kit/components/react";
@icidasset
Copy link
Contributor

Webpack 4 doesn't support the exports map (see webpack/webpack#9509) (more info about exports https://docs.skypack.dev/package-authors/package-checks#export-map)

In that case you can do the following import instead:

import { SignInButton } from "@fission-suite/kit/src/Components/React/index.js"

(you might be able to drop the /index.js)

If you need to do this with require, replace src with lib.

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

No branches or pull requests

2 participants