transformedAssetTypes is ignored
See original GitHub issueI am using Pattern Lab Node v5.15.0
on Linux
, with Node v16
, using a Twig
Edition.
Expected Behavior
When using a preprocessor like PostCSS to process CSS files, you want to deactivate the copy task for CSS. To do this, based on the manual, I would set following property in my pattern lab configuration:
{
"transformedAssetTypes": ["css", "js"]
}
Now building pattern lab, the public css folder set in paths.public.css
should not contain any CSS files.
Actual Behavior
transformedAssetTypes
seems to ignore the type “css”. It copies all the CSS files as configured in paths.source.css
to paths.public.css
.
As the preprocessor might be faster in compliling, Pattern Lab is also gonna overwrite any previously compiled CSS.
Actually, after testing further, it seems that setting is not applied any file type. I tested it with .scss
as file type by setting transformedAssetTypes
to ["scss"]
and file is still being copied despite the setting.
Steps to Reproduce
- Configure paths for CSS in
paths.source.css
andpaths.public.css
. - Add a CSS file to the source path
- Set the
transformedAssetTypes
to["css"]
. - Run
patternlab build --config ./patternlab-config.json
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Somewhere in the
copier.js
attransform_paths
, we could add functionality to ignore specific paths, or incopyFile.js
, we could add the option to ignore withtransformedAssetTypes
. I currently do not know Ifrecursive-copy
supports ignoring files or if we have to build something new here.Phew, I don’t know if this is the correct option. We have some old documentation here in the pattern lab wiki which does not match the patternlab.io website.
In my opinion, the functionality should do the same in watch and build mode, so that you don’t have different results.