create-guten-block
create-guten-block copied to clipboard
Compilation not working after ejecting
Hi!
I've tried to eject CGB because I need to change webpack configuration (to watch another JS file)
But just after ejecting, and launching compilation, it seems like the compiler doesn't like my JS (it worked fine prior ejection):
Anybody has an idea?
It seems like babel or something like this doesn't do its job well.
Ok found it !
When ejecting, a plugin is missing in package.json. By Adding "transform-class-properties", it works again:
"plugins": [
[
"transform-object-rest-spread"
],
[
"transform-class-properties" // I was missing!
],
[
"transform-object-rest-spread",
{
"useBuiltIns": true
}
],
[
"transform-react-jsx",
{
"pragma": "wp.element.createElement"
}
],
...
Also, do we need 2 times transform-object-rest-spread?
I have no "plugins" section in my package.json file. Is that specific to your project? I also ejected and now my CSS doesn't compile anymore.