Skip to content

Commit

Permalink
fix(mini-runner): 修复 app 样式打包错误的问题
Browse files Browse the repository at this point in the history
before:

```
// app css
@import base
// app css
@import taro
```

after

```
// app css
@import base
@import taro
```
  • Loading branch information
Chen-jj committed Jan 5, 2021
1 parent 8141ca2 commit 00b1db2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-mini-runner/src/plugins/MiniPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -819,11 +819,11 @@ export default class TaroMiniPlugin {

const originSource: string = assets[appStyle].source()
const source = new ConcatSource()
source.add(originSource)

Object.keys(assets).forEach(assetName => {
const fileName = path.basename(assetName, path.extname(assetName))
if (REG_STYLE.test(assetName) && this.options.commonChunks.includes(fileName)) {
source.add(originSource)
source.add('\n')
source.add(`@import ${JSON.stringify(urlToRequest(assetName))};`)
assets[appStyle] = {
Expand Down

0 comments on commit 00b1db2

Please sign in to comment.