Skip to content

Commit

Permalink
Fix sass imports for css modules
Browse files Browse the repository at this point in the history
Fixes #2501
  • Loading branch information
garthenweb committed Feb 17, 2019
1 parent e9ea941 commit 9bccd37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/parcel-bundler/src/transforms/postcss.js
Expand Up @@ -38,7 +38,9 @@ async function getConfig(asset) {

let postcssModulesConfig = {
getJSON: (filename, json) => (asset.cssModules = json),
Loader: createLoader(asset)
Loader: createLoader(asset),
generateScopedName: (name, filename) =>
`${name}_${md5(filename).substr(0, 5)}`
};

if (config.plugins && config.plugins['postcss-modules']) {
Expand Down

0 comments on commit 9bccd37

Please sign in to comment.