-
Notifications
You must be signed in to change notification settings - Fork 25
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
w3console build fails #291
Comments
A modified version of a fix proposed in preactjs/preset-vite#56 works here! Instead of aliasing the we also need to add an alias for |
side note that our react packages are using the old style explict we can remove those imports and update our babel config to use |
fixes #291 License: MIT Signed-off-by: Oli Evans <[email protected]>
Adds CI workflow to publish console to IPFS via web3.storage and Cloudflare Pages. - fixes #291 - PRs get a comment with the cloudflare dev url and an ipfs gateway url on. - merging PR to main updated dnslink for console.web3.storage and creates a prod deploy for the w3console project in cloudflare pages which should be configured to update the deployed site at console.web3.storage This is an iteration on the way we deploy the website in the web3.storage repo, see: https://github.com/web3-storage/web3.storage/blob/c973e7e0b29bc2f1bc6da348cdd2f66b0e00b1a3/.github/workflows/website.yml#L197-L243 License: MIT Signed-off-by: Oli Evans <[email protected]>
We need to be able to build the w3console project to a static site so we can deploy it, per #287
Currently the
vite
dev build works, but when compiling to a static site, rollup can't find thepreact/jsx-runtime
modules and errors:What I know so far
@preact/preset-vite
optimizeDeps
forpreact/jsx-runtime
which I think is what allows it to find that dep for the dev server. source@babel/plugin-transform-react-jsx
to use theruntime: automatic
andimportSource: preact
which would automatically insert an import for the newreact/jsx-runtime
(see blog post) in files that don't directlyimport React
but do use jsx, and rewrite it to use preact as the module to import it from rather than react sourcethis all works for the dev server, but rollup tries to locate
preact/*
deps for our react ui and headless components from their respectivepackage
trees... they arepnpm workspace:^
style deps so they are symlinked into the dep treee for w3console...this peer deps plus workspace deps issue is discussed in the pnpm docs and repo issues as solved by setting
dependenciesMeta.*.injected
config to tell pnpm to hardlink the workspace dep into the node_modules of the package dir that depends on them, but this broke the vite dev servers ability to locate the preact deps. https://pnpm.io/package_json#dependenciesmetainjectedThe text was updated successfully, but these errors were encountered: