Open frankieyan opened 3 years ago
Hi there, it looks like when a modules config object is provided, then the regex match using autoModules is ignored:
modules
autoModules
https://github.com/Anidetrix/rollup-plugin-styles/blob/e09ac0927053ffba52410e1d36b6b1c74ae63155/src/loaders/postcss/index.ts#L49
For example, using a configuration like the following would result in all stylesheets being treated as modules, rather than just *.module.css:
*.module.css
styles({ autoModules: /\.module\.css$/, modules: { mode: 'local', generateScopedName: '[hash]', }, }),
Would you welcome a change to something like the following?
const supportModules = Boolean((!options.autoModules && options.modules) || autoModules)
Hi there, it looks like when a
modules
config object is provided, then the regex match usingautoModules
is ignored:https://github.com/Anidetrix/rollup-plugin-styles/blob/e09ac0927053ffba52410e1d36b6b1c74ae63155/src/loaders/postcss/index.ts#L49
For example, using a configuration like the following would result in all stylesheets being treated as modules, rather than just
*.module.css
:Would you welcome a change to something like the following?