Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axelson/asset_status
https://github.com/axelson/asset_status
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/axelson/asset_status
- Owner: axelson
- License: mit
- Created: 2024-02-10T18:46:18.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-10T18:52:01.000Z (12 months ago)
- Last Synced: 2024-10-15T19:43:25.443Z (3 months ago)
- Language: Elixir
- Size: 419 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AssetStatus Error Example
This is a simple example phoenix app that includes a plug that hooks into an esbuild plugin to show the developer an error when their assets are not building successful (and prevent serving pages in dev mode when that is true)
Inspired by the question in this ElixirForum post: https://elixirforum.com/t/how-do-i-make-phoenix-server-refuse-to-serve-pages-when-theres-an-error-in-assets/61538
When there is an error you will see an error like:
![Example of error status page](screenshot_error_example.png)This example app by default is in the broken assets state, to fix the assets comment out the broken line in `assets/js/app.js`
I have no intention of publishing this as a library but feel free to include it in your project or release it as a library. I'm releasing this under an MIT license.