Skip to content
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

Simplify asset building #3459

Merged
merged 22 commits into from
Nov 1, 2023
Merged

Simplify asset building #3459

merged 22 commits into from
Nov 1, 2023

Conversation

ukutaht
Copy link
Contributor

@ukutaht ukutaht commented Oct 24, 2023

Changes

Replaces Webpack and PostCSS setup with esbuild and Tailwind CLI tools via their respective Elixir wrappers. The aim is to improve developer experience by speeding up asset builds in local development cycles. The new build system in general is simpler to manage and configure compared to webpack (IMO). Production artifacts (minified JS and CSS files) should be functionally equivalent to the previous webpack setup.

The setup is more or less copied verbatim from a project generated with mix phx.new. It needed some adjustment for our setup, specifically multiple build targets for JS and the use of JSX/React. But if you squint it should look like a standard modern Phoenix setup.

TODO:

  • Embed javascript
  • Review paths for Phoenix Livereloader
  • Production builds (Dockerfile)
  • Test on staging

@ukutaht ukutaht changed the title Improve asset building Simplify asset building Oct 24, 2023
@ukutaht ukutaht added the deploy-to-staging Special label that triggers a deploy to a staging environment label Oct 26, 2023
@ukutaht ukutaht requested a review from a team October 26, 2023 11:28
@ukutaht ukutaht marked this pull request as ready for review October 26, 2023 11:31
@aerosol
Copy link
Member

aerosol commented Nov 1, 2023

Checking out the PR locally. Do setup instructions from CONTRIBUTING.md still apply or has anything changed wrt building a clean project?

@ukutaht
Copy link
Contributor Author

ukutaht commented Nov 1, 2023

Good point, thanks @aerosol. Added a step here: 843e16a

@ukutaht ukutaht merged commit cfe81d6 into master Nov 1, 2023
5 checks passed
@ukutaht ukutaht deleted the improve-asset-building branch November 1, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-to-staging Special label that triggers a deploy to a staging environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants