Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Rewire client build and use preact-cli@3.0.0-rc.* #131

Closed
@ethanwu10

Description

@ethanwu10

The client build is currently dependent on a shell script, and is running on an older version of preact-cli (the starter projects created by preact-cli all use preact-cli@3.0.0-rc.6, so we should probably also be using the rc versions). Given the refactoring that needs to be done to the webpack configuration to do this upgrade, we should also fix some other issues / annoyances with our client-side build system.

Goals

  • no shell script to build - build everything through preact build (with flags set)
  • use SVG sprite sheets for our SVG loader to avoid duplicating inline SVG - most likely we will use this loader, and an example is included for generating React components automatically (which is what happens with our current config using preact-svg-loader)
  • use preact-cli's builtin API proxying capabilities in dev mode to avoid needing to have the client access the API cross-origin in dev mode
  • fix serving of static files on the server to not require physically moving build outputs on disk (technically a sub-point of removing the shell script)

Upgrading preact-cli (and thus webpack) also will solve our issues with portals crashing on unmount, because this was caused by Webpack resolving the import to the main 'preact' module differently from preact's submodules ('preact/compat'), which are incompatible due to Preact's output setup and mangler in their build.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions