ericclemmons / react-resolver

Async rendering & data-fetching for universal React applications.
https://ericclemmons.github.io/react-resolver
Other
1.65k stars 52 forks source link

Fix compatibility with Babel 6 #138

Open Paul-DS opened 5 years ago

Paul-DS commented 5 years ago

Hello,

Thank you for this awesome project !

I just tried to import react-resolver on one of my new project, and I found out that your babel configuration is not compatible with the new Babel versions.

Your .babelrc contain the following:

{
  "stage": 0
}

Which is not valid anymore.

This should be replaced by the following:

{
  "presets": ["stage-0"]
}

Thank you


Edit: The error displayed when compiling with babel 6 is the following:

ERROR in ./~/react-resolver/dist/index.js Module build failed: ReferenceError: [BABEL] node_modules\react-resolver\dist\index.js: Using removed Babel 5 option: node_modules\react-resolver.babelrc.stage - Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets at Logger.error (node_modules\babel-core\lib\transformation\file\logger.js:41:11) at OptionManager.mergeOptions (node_modules\babel-core\lib\transformation\file\options\option-manager.js:220:20) at OptionManager.init (node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12) at File.initOptions (node_modules\babel-core\lib\transformation\file\index.js:212:65) at new File (node_modules\babel-core\lib\transformation\file\index.js:135:24) at Pipeline.transform (node_modules\babel-core\lib\transformation\pipeline.js:46:16) at transpile (node_modules\babel-loader\lib\index.js:46:20) at Object.module.exports (node_modules\babel-loader\lib\index.js:163:20)