Open sookoll opened 7 years ago
Could this be related to jspm/jspm-cli#778? Also, does this occur with other plugins? I think you might have to file an issue w/ JSPM about this because it seems like it cannot even locate the module.
Yes, You are right, jspm 0.16 does not support babel plugins. jspm@beta will. Tried that, plugin are loaded but it doesn't work (got 404 for modules_directory.js). JSPM by default load babel and es6 modules into browser and then transpile. I guess that wildcard plugin needs to access file system to determine modules, right? So only option would be server-side transpiling also in development mode.
UPDATE: Tried development bundling as described here: https://jspm.io/0.17-beta-guide/development-bundling.html with no luck.
$ jspm install --dev npm:babel-plugin-wildcard
SystemJS.config({
...
meta: {
'*.js': {
babelOptions: {
plugins: ['babel-plugin-wildcard']
}
}
}
});
command to transpile bundle:
$ jspm bundle src/main.js src/build.js -id
It never recognize, that it should use wildcard plugin for imports.
I think the problem is babel auto-prepends "babel-plugin-" when searching for the plugin, e.g. try simply: plugins: ['wildcard']
Have you tried it on jspm setup? For me it doesn't work, as I got:
My config.js looks like this: