The docker environment can be found here.
- To deal with the problem that #6662 "js files are not compressed"
- To be a foundation for future npm package usage.
#1 Updated by Takashi Kato over 1 year ago
I'm going to post a few suggestions, since it seems that posts can't be too long.
- reduces the number of HTTP accesses by bundling files.
- However, I do not know if there will be any visible performance improvement at this time.
- Image files in CSS have hash query string(for more accurate cache control).
#2 Updated by Takashi Kato over 1 year ago
Questions that may be asked¶
- The default for Rails6 is webpacker. Why use simpacker instead of webpacker?
- I believe it is appropriate to use simpacker because it is a thin wrapper and does not make administration overly complicated.
- webpack was released ver5 last year, and it includes commonly used plugins and loaders, and there is also extensive documentation on the official website. it is faster to use the simpacker to control the webpack more directly.
- This is a tool developed by an engineer of cookpad , the most famous rails user company in Japan. I hope this will be a good opportunity for you to get interested in it.
- Do all Redmine users have to install nodejs and yarn in addition to ruby?
- webpack is a tool to organize js into chunks, but language files of the jstoolbar, datepicker can be separated into different files instead of combined into one so that extra files are not loaded.
- If you use the npm module, the jquery will not be visible on the plugin side?
- "expose-loader" exposes jquery, tributejs, etc. globally. It seems that there is no effect on plugins that expects Redmine to load jquery.
- "rails-ujs" also expects that jquery is published globally (if not, jquery doesn't add CSRF protection functionality), but it works fine after patching.
- How does it affect the plugin and theme?
- UI Extension
- The filename of "chartjs" has been changed, so it needs some modifications.
- Issues Panel
- Issue Templates
- UI Extension
- Is it reasonable to use webpack as a bundle management tool?
- rails use webpack.
- Others such as "Parcel" , "Vite" , "Rome" , etc.
- "vite" has a generous rails integration (https://github.com/ElMassimo/vite_ruby) feature, but it doesn't support jquery. (jquery needs a patch).
- Use of unit testing tools such as mocha and npm packages such as eslint and prettier
- Currently, all functions in application.js are public.
- Initially, all functions will be made public as before. After some refactoring, we may remove codes considered to be unnecessary to publish from export.
- DOM traversal will be less frequent, so dependency on jquery will naturally decrease (but I don't want to de-jquery).
- Simpacker refers to the manifest.json generated by webpack to get the information of various assets. During development, if manifest.json is missing even after starting Redmine, an exception will occur.
- All developers need to install nodejs.