Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Can't use with babel-plugin-transform-es2015-modules-systemjs #1

Open
aaronmars opened this issue Aug 18, 2017 · 1 comment
Open

Can't use with babel-plugin-transform-es2015-modules-systemjs #1

aaronmars opened this issue Aug 18, 2017 · 1 comment

Comments

@aaronmars
Copy link

Is this intended to be used with the main Systemjs module transform?
If so, I am getting an error just trying to use these together:

babel.transform('import foo from \'bar.js\';', { plugins: [ 'transform-es2015-modules-systemjs', 'transform-system-register' ] });

Gives me the error:

TypeError: unknown: Source undefined is already a bundle file, so can't be built as a module.
@asapach
Copy link
Member

asapach commented Aug 18, 2017

It's used internally by Builder and is not really meant for public consumption. You're supposed to pass the module name as a transform parameter.
Although the error message could be better.

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

No branches or pull requests

2 participants