Skip to content

Commit

Permalink
cra wont work with es6 library code unless you include it in babel tr…
Browse files Browse the repository at this point in the history
…anspilation
  • Loading branch information
okwolf committed Jan 21, 2018
1 parent 369b28b commit ed94252
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ if (!babelLoaders.length) {
`missing Babel config in webpack config: ${webpackConfigPath}`
);
}
// include our own compatibility helper functions in the babel transpilation
babelLoaders[0].include = [].concat(
babelLoaders[0].include,
require.resolve("cra-hyperapp")
);
const babelOptions = babelLoaders[0].options;

// override ESLint rules to allow using JSX with Hyperapp
Expand Down

0 comments on commit ed94252

Please sign in to comment.