Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Imports from "." path break the application #8

Open
alfredsgenkins opened this issue Dec 28, 2020 · 0 comments
Open

Imports from "." path break the application #8

alfredsgenkins opened this issue Dec 28, 2020 · 0 comments

Comments

@alfredsgenkins
Copy link
Contributor

Describe the bug

The import of most components from popular library antd break the application compilation with following error:

/home/scandiweb/Projects/create-scandipwa-app/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js
Attempted import error: 'Components' is not exported from '../../../../../runtime-packages/csa-blank/src'.

The file it is referring to, contains following import declaration:

import { getTimeProps, Components } from '.';

If I change it to ./index.js then it works. The question is what is causing the setup to assume that such import . is pointing to ../../../../../runtime-packages/csa-blank/src. The thing is - it is coming such way into the fallback plugin, we do not intercept this request (which is expected).

The resolver's hook resolve arguments request and resolveContext are already containing this value, not the expected ..

Expected behavior

I am, honestly speaking, unsure if this is expected or not. I have not seen the issues like that reported antd library, thus I assume that issue is something to deal with our setup. I was unable to research where does it came from.

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

No branches or pull requests

1 participant