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

Use babel resolvers instead of 'absolute' imports #27

Open
jaeddy opened this issue Jun 8, 2020 · 1 comment · May be fixed by #50
Open

Use babel resolvers instead of 'absolute' imports #27

jaeddy opened this issue Jun 8, 2020 · 1 comment · May be fixed by #50

Comments

@jaeddy
Copy link
Member

jaeddy commented Jun 8, 2020

Looking back to these comments in #22:

image

The @lib/environment import apparently gets interpreted (when trying to use babel-node to compile and execute an ES6+ formatted script) as a module/dependency:

Error: Cannot find module '@lib/environment'

It looks like we might be able to use babel-plugin-module-resolver to achieve similar aliasing benefits, but with more control and (hopefully) more flexibility for local testing.

@tschaffter
Copy link
Collaborator

I have used a similar approach here: https://github.com/Sage-Bionetworks/sagebio-collaboration-portal/blob/b83bb3a2af92e1596724682a642bb78d7bf7e226/webpack.make.js#L78

I'll create a PR that addresses this ticket.

@tschaffter tschaffter linked a pull request Sep 2, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants