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

How to use babel plugins (dev only)? #83

Open

Description

@sookoll

I tried to use babel-plugin-wildcard. 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. So only option was server-side transpiling also in development mode.
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 transpile imports. Any quidance?

Activity

  1. aluanhaddad commented on Aug 15, 2017

    @aluanhaddad

    The docs for that plugin show the name of the plugin as "wildcard" when passed to Babel.

    Try this (untested):

    $ jspm install --dev wildcard=npm:babel-plugin-wildcard

    and in your configuration

    SystemJS.config({
      meta: {
        '*.js': {
          babelOptions: {
            plugins: ['wildcard']
          }
        }
      }
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions