postcss-modules icon indicating copy to clipboard operation
postcss-modules copied to clipboard

Underscore and integer being appended to localIdentName.

Open DaemonCahill opened this issue 7 years ago • 1 comments

I'm loving CSS Modules with Vue.js but am having an issue dealing with a static export for server side rendering. I've been using the following for my localIdentName in webpack config:

cssModules: { localIdentName: '[name]-[local]' },

However, all of my classnames are generating with an _0 at the end and I cannot figure out how to remove it. Any help would be greatly appreciated. Please refer to the attached image:

screen shot 2017-05-17 at 4 46 48 pm

DaemonCahill avatar May 17 '17 20:05 DaemonCahill

As it turns out this appears to be a symptom of having the styles in Vue single file components. If I import the style from an external file, the _int goes away. Any idea whether this is an issue that needs to be addressed on the Vue end or the Webpack / PostCSS end? Thanks!

DaemonCahill avatar May 18 '17 14:05 DaemonCahill