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

Missing Babel dependencies in 5.0 #75

Closed
goto-bus-stop opened this issue Mar 5, 2020 · 0 comments
Closed

Missing Babel dependencies in 5.0 #75

goto-bus-stop opened this issue Mar 5, 2020 · 0 comments

Comments

@goto-bus-stop
Copy link
Contributor

goto-bus-stop commented Mar 5, 2020

There are a few issues with #69 and the 5.0 release. The babel config uses relative preset/plugin names like "env", which causes babel to resolve it relative to the project's directory, not the directory where extract-loader is installed. If the user's project does not use Babel 6, or uses a different version, that is a problem.

The fix for that is to do require('babel-preset-env') in the babel config, so it resolves to the version of that package installed with extract-loader.

I tried to fix that but ran into a different issue. babel-preset-env is not listed as a dependency, but as a devDependency for extract-loader. That is an easy fix of course, but I'm not sure if it's the best thing to do to depend on babel-preset-env. If the goal is only to support ES modules, would it be a better idea to use babel-plugin-modules-commonjs?

@goto-bus-stop goto-bus-stop changed the title Missing Babel dependencies Missing Babel dependencies in 5.0 Mar 5, 2020
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

1 participant