-
-
Notifications
You must be signed in to change notification settings - Fork 863
Closed
Labels
Description
Current Behavior
jsDirectory files are not being copied to the assets directory when MIME type detection incorrectly identifies JavaScript files as a different type. This commonly occurs with minified or bundled JS files. The compiler relies solely on MIME type checking, which is unreliable in Flysystem for certain JS file contents. Extensions defining jsDirectory only for the common frontend are particularly affected, as their files are silently skipped during compilation.
Steps to Reproduce
- Create an extension that defines jsDirectory for the common frontend with minified JavaScript files
- Enable the extension
- Clear the cache using php flarum cache:clear
- Access the forum or admin frontend
- Check the public/assets/js/extension-id/ directory - the expected JavaScript files will be missing
Expected Behavior
The JavaScript files from the extension's jsDirectory should be copied to the public/assets/js/extension-id/ directory and be accessible for lazy loading by the frontend application.
Screenshots
No response
Environment
- Flarum version: x.y.z
- Website URL: http://example.com
- Webserver: [e.g. apache, nginx]
- Hosting environment: [e.g. shared, vps]
- PHP version: x.y.z
- Browser: [e.g. chrome 67, safari 11]
Output of php flarum info
Output of "php flarum info", run this in terminal in your Flarum directory.
Possible Solution
No response
Additional Context
No response
Reactions are currently unavailable