Skip to content

Commit

Permalink
fix(mini-runner): 修复对 css modules 的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Dec 31, 2019
1 parent e38ebc7 commit 5019023
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/taro-mini-runner/src/webpack/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,15 @@ export const getModule = (appPath: string, {
{
importLoaders: 1,
sourceMap: enableSourceMap,
modules: namingPattern === 'module' ? true : 'global'
modules: {
mode: namingPattern === 'module' ? 'local' : 'global'
}
},
typeof generateScopedName === 'function'
{
modules: typeof generateScopedName === 'function'
? { getLocalIdent: (context, _, localName) => generateScopedName(localName, context.resourcePath) }
: { localIdentName: generateScopedName }
}
),
cssLoaderOption
]
Expand Down

0 comments on commit 5019023

Please sign in to comment.