Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 使用 Nodejs API weapp-tailwindcss/core,无法获取 SourceMap #355

Closed
skywalker512 opened this issue Aug 14, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@skywalker512
Copy link

weapp-tailwindcss 版本

3.4.0

框架 & 小程序平台

N/A

最小复现bug的代码仓库链接

No response

复现bug的步骤

https://github.com/sonofmagic/weapp-tailwindcss/blob/weapp-vite%401.0.1/packages/weapp-tailwindcss/src/js/index.ts#L213

https://github.com/sonofmagic/weapp-tailwindcss/blob/weapp-vite%401.0.1/packages/weapp-tailwindcss/src/js/index.ts#L193

看这两处地方,没有输出 map,weapp-tailwindcss/core api 中也没有 map 属性

预期是什么?

期望能输出 source map

实际发生了什么?

没有 map 输出

运行环境

No response

其他附加信息

No response

@skywalker512 skywalker512 added the bug Something isn't working label Aug 14, 2024
@skywalker512
Copy link
Author

如果输出 map 是符合预期的我可以提交 mr

@sonofmagic
Copy link
Owner

sonofmagic commented Aug 14, 2024

是的,返回 js / css 的 sourcemap 是符合预期的,这样我把新版本到 3.5.0 ,在这个版本里面把 weapp-tailwindcss/core 的返回值,从一个 string,变成一个对象:

已经在 3.5.0 版本中发布

js 的返回结果,从string 变为

{
  code: string,
  map: SourceMap
}

css 的返回结果从,string 变为

{
 css :string,
 map: SourceMap
}

其他字段同 postcss Result

希望能对你有所帮助

sonofmagic added a commit that referenced this issue Aug 14, 2024
* chore(demo): commit taro v4 vite demo

* chore(demo): upgrade deps

* chore(demo): taro-app upgrade v4

* chore(demo): upgrade

* docs: add taro v4 vite

* chore(demo): upgrade snap

* feat(weapp-tailwindcss): [Bug]: 使用 Nodejs API weapp-tailwindcss/core,无法获取 SourceMap #355

* chore(weapp-vite): remove strict head

* fix(weapp-vite): watcherCache close watcher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants