systemjs / builder

SystemJS build tool
MIT License
466 stars 122 forks source link

How to fix 'defaultJSExtensions configuration option is deprecated ...' #856

Open ericnewton76 opened 5 years ago

ericnewton76 commented 5 years ago

Given a config.js similar to:

System.config({
  defaultJSExtensions: true,
  transpiler: "plugin-babel",
  babelOptions: {
    "optional": [
      "runtime",
      "optimisation.modules.system"
    ]
  },
  paths: {
    "github:*": "jspm_packages/github/*",
    "npm:*": "jspm_packages/npm/*"
  },
  warnings: true,

  meta: {
    "*": {
      "babelOptions": {
        "react": true
      },
      "defaultExtension": "js"
    }
  },

  map: {
    "accounting": "npm:accounting@0.4.1",
    "babel": "npm:babel-core@5.8.38",
    "babel-runtime": "npm:babel-runtime@5.8.38",
    "core-js": "npm:core-js@1.2.7",
"---snip---":"--------------------snip-------------------------"
  }

When I remove line 2: 'defaultJSExtensions: true' then I get error when bundling:

err  Error on fetch for src/pricing at file:///C:/Projects/CLIENT/CLIENTPROJECT/site_FED/src/pricing
        Error: ENOENT: no such file or directory, open 'C:\Projects\CLIENT\CLIENTPROJECT\site_FED\src\pricing'
         at Error (native)