I am struggling with the following issue. I have a webpack plugin that is optimizing my css files. Now I want to exclude one specific file from being processed.
This is the plugin:
https://github.com/NMFR/optimize-css-assets-webpack-plugin
Now there is an option to specify the file pattern that should be processed:
assetNameRegExp: /\.optimize\.css$/g,
Now I want to exclude one speficic file: my-stylesheet.css
I tried a lot of things and I am pretty sure that I will need some negative lookaheads, but I can't get it to work.
So far I am here:
/^.*(?!my-stylesheet\.css)/ or event without the preceding characters:
/^(?!my-stylesheet\.css)$/
But it will always match. What am I doing wrong?
- whatever.scss - should match(I don't know if at that point I still have scss files)
- another/css.css - should match
- my-other-stylesheet.css - should match
- my-stylesheet.css - should NOT match
Thank you so much in advance for your help. Cheers
