Skip to content

Commit

Permalink
fix(mini-runner): 修复 css-loader 升级 3.0.0 后带来 breaking change 问题,close #…
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed May 13, 2020
1 parent 9526fb1 commit 03e0531
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/taro-webpack-runner/src/util/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,15 @@ 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 03e0531

Please sign in to comment.