rollup-plugin-postcss icon indicating copy to clipboard operation
rollup-plugin-postcss copied to clipboard

chore: support custom autoModules

Open 2heal1 opened this issue 3 years ago • 2 comments

support custom autoModules like css-loader-auto

2heal1 avatar Jun 06 '22 10:06 2heal1

the CircleCi use node v16 which cause the CI failed

2heal1 avatar Jun 06 '22 11:06 2heal1

Just stumbled upon this because my project only knows CSS modules, thus the file tag can be omitted (which rollup-plugin-postcss per default does not allow). However, it can be achieved by disabling autoModules and setting modules to true:

{
    // Disable `autoModules` and always enable `modules` (so that all input files are treated as modules)
    autoModules: false,
    modules: true
})

Just leaving this bit of information here in case anybody is looking for the same functionality.

filecage avatar Aug 15 '22 20:08 filecage