create-guten-block
create-guten-block copied to clipboard
You may need an appropriate loader to handle this file type.
A react component (KenburnsEditor) causes a build error when imported in the gutenblock:
import { KenburnsEditor } from 'kenburns-editor';
A fork (forked off from gre) has to be used currently:
yarn add github:strarsis/kenburns-editor
yarn build
./node_modules/kenburns-editor/src/KenburnsEditor.js
Module parse failed: Unexpected token (310:13)
You may need an appropriate loader to handle this file type.
| if (!innerRect) {
| return <div style={styles} />;
| }
I believe the issue may be related to the presets being used for babel loader - we are including the env
preset but not the react
one as far as I can see.
Have you tried ejecting in a separate branch (npm run eject
) and adjusting any of the config?
You would probably need to run npm install @babel/preset-react
and then add "react" to the babel.presets
array in your package.json. Then try to build.