systemjs / plugin-babel

SystemJS Babel Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

babelOptions are ignored

lookfirst opened this issue · comments

I'm getting this in the chrome console trying to load a large file...

VM101480:27 [BABEL] Note: The code generator has deoptimised the styling of "http://host.com:8080/js/util/redactor/redactor.js" as it exceeds the max of "100KB". window.console.error 
@ VM101480:27b.normalizeOptions 
@ systemjs-babel-browser.js:7b 
@ systemjs-babel-browser.js:7b.default 

I can't figure out where to add the 'compact: false' option. I have tried numerous places in SystemJS.config() in jspm.config.js to no avail...

SystemJS.config({
  transpiler: "plugin-babel",
  babelOptions: {
    "modularRuntime": false,
    "compact": false
  },
  meta: {
    "*.js": {
      "babelOptions": {
        "compact": false
      }
    }
  },
  packages: {
    "hub": {
      "format": "cjs",
      "main": "app.js",
      "meta": {
        "*.js": {
          "loader": "plugin-babel",
          "babelOptions": {
            "compact": false
          }
        }
      }
    }
  }
});

I can't set compact: false anywhere. I hand modified plugin-babel.js and that fixed things...

line: 154

    var output = babel.transform(load.source, {
      compact: false,
      babelrc: false,

These formatting options aren't currently supported. I guess it would make sense to support passing these through, added in 1835b16.