Skip to content

Commit ed94252

Browse files
committed
cra wont work with es6 library code unless you include it in babel transpilation
1 parent 369b28b commit ed94252

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ if (!babelLoaders.length) {
3838
`missing Babel config in webpack config: ${webpackConfigPath}`
3939
);
4040
}
41+
// include our own compatibility helper functions in the babel transpilation
42+
babelLoaders[0].include = [].concat(
43+
babelLoaders[0].include,
44+
require.resolve("cra-hyperapp")
45+
);
4146
const babelOptions = babelLoaders[0].options;
4247

4348
// override ESLint rules to allow using JSX with Hyperapp

0 commit comments

Comments
 (0)