Hi, how do I go about compiling the js files? I get this error when I run the build? Module not found: Error: Can't resolve 'gutenberg/packages/block-editor/build-style/style.css'
I assume I need to install gutenberg somewhere.
I am trying to get server side rendered custom blocks working but I need to add some new routes to the api-fetch.js file.
If I get this all working I will raise a pr back to the repo.
Many Thanks,
Tom
Yes you're right, you have to install Gutenberg locally and link the package to your global npm install.
This is not described in the README yet, so I'll make sure to add that today, but for now:
git clone https://github.com/WordPress/gutenberg.git
cd gutenberg
and then npm install
(sudo) npm link
Then in your Laraberg directory you can install gutenberg:
npm link gutenberg
Pretty much will, it currently looks like Laraberg::registerBlock($name, ...)
So you register your widget in your app service provider with the same name like you do in WordPress.
I think I might enforce an interface as the second argument as I don't like the building from array option that WordPress has but am happy if you would prefer supporting both.
Also, I'd prefer to find a more generic way to handle media... The ideal situation for me would be to have a simple default file manager + an optional system that could be used to implement most 3rd party file managers by the developers themselves
react-dom.production.min.js:117 TypeError: e is not a function
at o.value (laraberg:52)
at ce (react-dom.production.min.js:98)
at qg (react-dom.production.min.js:97)
at hi (react-dom.production.min.js:104)
at Qg (react-dom.production.min.js:144)
at Rg (react-dom.production.min.js:145)
at Sc (react-dom.production.min.js:158)
at Z (react-dom.production.min.js:156)
at Kc (react-dom.production.min.js:155)
at si (react-dom.production.min.js:132)