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

Webpack Loader Can't Resolve jsconfig.json Alias #652

Closed
pxwee5 opened this issue Aug 11, 2020 · 1 comment
Closed

Webpack Loader Can't Resolve jsconfig.json Alias #652

pxwee5 opened this issue Aug 11, 2020 · 1 comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler cat: modules aliasing 🔗 Issue related to modules aliasing needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@pxwee5
Copy link

pxwee5 commented Aug 11, 2020

Does this work with jsconfig.json ? I'm getting some issue with an alias set in jsconfig.json.
Probably related to #284

File with linaria import & jsconfig alias:

import { css } from 'linaria';
import { colors } from '@themes/base';

css`
  :global() {
    .type-h3 {
      color: ${colors['gray-lynx']};
    }
  }
`;

Produces error:

Can't resolve '@themes/base' in ... Make sure you are not using a browser or Node specific API.

Using relative path like ../src/themes/base works perfectly.

@pxwee5 pxwee5 added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Aug 11, 2020
@github-actions github-actions bot added bundler: webpack 📦 Issue is related to webpack bundler cat: modules aliasing 🔗 Issue related to modules aliasing and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Aug 11, 2020
@Anber
Copy link
Collaborator

Anber commented Aug 14, 2020

Hi @pxwee5

Unfortunately, it doesn't. I can recommend you to use babel-plugin-module-resolver which is fully supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler cat: modules aliasing 🔗 Issue related to modules aliasing needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

No branches or pull requests

2 participants