father icon indicating copy to clipboard operation
father copied to clipboard

bug: `extractCSS: true`打包的时候,build未正确输出css文件

Open vicalloy opened this issue 4 years ago • 1 comments

Versions

  • dumi:1.0.38
  • node: v15.3.0
  • npm: 7.0.14
  • OS: mac os
  • Browser: chrome

Steps to reproduce

git clone https://github.com/vicalloy/dumi-css-issue
yarn install
yarn build

What is Expected?

  1. src/ 目录下的 css/less 被正确编译并输出到 dist/目录下。
  2. import css from './index.css';被正确编译。

What is actually happening?

  1. dist/index.d.ts 中包含了 import './style/s.css';,dist下却无对应文件。
  2. src/Foo/index.tsimport css from './index.css';在编译后的dist/index.esm.js,被编译成了var css = undefined;

vicalloy avatar Dec 12 '20 13:12 vicalloy

@vicalloy 是否配置了 umd 打包输出, 如果是 esm, cjs 好像不会单独构建 css 文件到 dist

leohxj avatar Apr 22 '22 09:04 leohxj

father 4 已发布,可尝试升级到最新版:https://github.com/umijs/father/blob/master/docs/guide/migrate.md

旧版本不再维护,感谢支持

PeachScript avatar Aug 31 '22 11:08 PeachScript