-
Notifications
You must be signed in to change notification settings - Fork 8
Replace CRA tooling with esbuild+Make #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.4
Are you sure you want to change the base?
Conversation
- Support the `-components` flag on `dsk`, to allow passing a path to a pre-build component bundle output directory. - Provide playground handlers. - Refactor `<Playground>` - Use IFrame in Playground Unrelated: - Deprecate Node.components response property. - Improve routing techniques, by using sub routers and allow us to extract route params. - Rename flag variables. - Pass more parent and current node into documentation components. - Nodes now have an `id` that can be used to adress them. Although not from the outside.
Before, this generated the same Id for any component that had the same content no matter the tag or attributes, which leads to problems with empty components: <ColorCard color="#FF00000"></ColorCard> and <TableOfContents></TableOfContents> got the same Id. Adding the position to the string to be hashed ensures uniqueness.
|
I would definitely prefer to get rid of the webpack config. I do like the live-reload a lot, but we could try without. @mariuswilms I just renamed a lot of files in the |
00384df to
6da7994
Compare
|
I've rebased this onto |
|
Test now don't pass but run. Please note that they don't pass as there is an issue in user-components that makes the tests fail. It should be adressed there. |
|
The back or front end? I’d gotten the front end running with react-scripts. We can just roll our own jest config though.
… On Oct 14, 2021, at 09:39, Marius Wilms ***@***.***> wrote:
Test now don't pass but run. Please note that they don't pass as there is an issue in user-components that makes the tests fail. It should be adressed there.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
I stand corrected it's an issue introduced in this branch. I've removed support for objects (React nodes) as children of CodeBlock. You receive those when you use the component (not the markdown fenced code syntax) and don't use script tags to wrap the inner content. I removed support for that in this branch as it required React DOM Server which in turn requires additional shims when build through esbuild. It's a feature we don't need anyway and can live without, since Christoph figured how to ensure we always receive unparsed string content in CodeBlock. I'll be fixing that test here. When everything looks good and user-components is merged into 1.4 I'll squash/separate out commits in this branch and merge them into 1.4. |
This requires React DOM Server which when build through esbuild requires additional shims.
ecb41ac to
fb5421c
Compare
|
I've fixed the failing test in user-components, the commit that introduced the issue here belonged there. As user-components is where we got rid of the necessity of supporting react nodes in CodeBlock. |
|
Last remaining bit here is fixing esbuild config to support data:image URLs in CSS, or finding a workaround for that. |
fb5421c to
871946d
Compare
871946d to
80bbffa
Compare
|
Also fixed that, all done, waiting for user-components to merge, or additional reviews that block this PR. |
Building upon #140, I have our frontend now being build with esbuild and some Make, instead of using webpack and the tooling coming with CRA. This frees us from following CRA.
As with the CRA tooling
make devwill also bring up a development server on port 3000, forwarding all API requests to a running backend instance on port 8080. The esbuild development server does not live reload, instead developers must refresh the browser which will cause a rebuild and reserver of the changed files.We should probably merge this PR after user-components have been merged, as I had to use the jsx suffix for all files containing JSX. This might create a great amount of conflicts otherwise.