Version 2.4.0 of @lipemat/postcss-boilerplate is now stable and ready for general use. This release focused on fixing any outstanding bugs as well as introducing the most requested feature.
Generate admin.css simultaneously:
From the beginning of this library we have received requests to automatically generate an “admin.css” file using “admin.pcss” as the entry point. This has always been the most requested feature.
Previously, if you wanted to generate two separate CSS files from the same source directory you would have to use a configuration override.
Now generating an “admin.css” file is as simple as creating an “admin.pcss” file in the same directory as your “front-end.pcss” file. If you have specified a different
file_name via your
package.json, the “admin.pcss” file still goes in the same directory as your main .pcss file.
There are not a ton of known bugs in this library right now, but here are a couple of edge cases we fixed.
Add hash to end of CSS classes during development:
Back in version 2.3.0, we shortened and enhanced the CSS classes which are generated during development when using CSS modules. 80% of the time these worked great. In some applications there are duplicate file and directory names that load on the same page causing conflicts.
After careful consideration, we decided it was worth losing the totally clean classes in favor of not creating edge-case conflicts which are time consuming to troubleshoot. We brought back a single-character hash to the end of classes during development to prevent any of the edge-case conflicts.
Fix doubling up of drive letter paths during composes recursion:
In rare cases (and only on Windows) using
composes from another file which also uses
composes, was causing the drive letter to double up when generating source maps. While not particularly harmful, this was causing some frustration during development because in rare cases the browser could not find the correct CSS module.
This has been fixed and source maps are now fully functional on Windows when using
Edge case on Windows machines.