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.

The plugin doesn't seem to be doing anything #84

Description

@tomasvarg

I'm not able to run anything needing transpilation even with the most basic configuration - attempt to run something ends with syntax error on node_modules/systemjs/dist/system.src.js:2823:8; when I try to log source param of the getSource function on this line I'm getting untranspiled code.

index.html (only the relevant part):

    <script src="node_modules/promise-polyfill/promise.js"></script>
    <script src="node_modules/systemjs/dist/system.src.js"></script>
    <script src="system.config.js"></script>
    <script>
      SystemJS.import('index.js');
    </script>

system.config.js:

SystemJS.config({
    map: {
        'plugin-babel': 'node_modules/systemjs-plugin-babel/plugin-babel.js',
        'systemjs-babel-build': 'node_modules/systemjs-plugin-babel/systemjs-babel-browser.js'
    },
    transpiler: 'plugin-babel'
});

(Adding baseURL, defaultJSExtension won't help)

index.js

setTimeout(() => {
    console.log('Hello from es6!');
}, 0);

Exact stack trace:

SyntaxError: Wrong syntax
   at evaluate (http://10.0.0.13:8081/node_modules/systemjs/dist/system.src.js:2823:8)
   at Anonymous function (http://10.0.0.13:8081/node_modules/systemjs/dist/system.src.js:3626:11)
   at dynamicExecute (http://10.0.0.13:8081/node_modules/systemjs/dist/system.src.js:1145:5)
   at doEvaluate (http://10.0.0.13:8081/node_modules/systemjs/dist/system.src.js:1092:7)
   at ensureEvaluate (http://10.0.0.13:8081/node_modules/systemjs/dist/system.src.js:1000:3)
   at Anonymous function (http://10.0.0.13:8081/node_modules/systemjs/dist/system.src.js:613:7)
   at Anonymous function (http://10.0.0.13:8081/node_modules/promise-polyfill/promise.js:44:9)

versions (apart from promise-polyfill no other packages present):

    "systemjs": "^0.20.18",
    "systemjs-plugin-babel": "0.0.25"

(Don't have any other old browser than IE11, sorry. Also tried to include various core-js polyfills.)

Am I missing something obvious?

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