evrone / postcss-px-to-viewport

A plugin for PostCSS that generates viewport units (vw, vh, vmin, vmax) from pixel units. The best choice to create a scalable interface on different displays by one design size.
https://evrone.com/postcss-px-viewport
MIT License
2.98k stars 401 forks source link

重写了PostCSS 8的迁移库 migration library that supports PostCSS 8 #167

Open kirklin opened 8 months ago

kirklin commented 8 months ago

I've developed this migration library that supports PostCSS 8. Check it out at https://github.com/kirklin/postcss-px-conversion 我重写了支持PostCSS 8的迁移库,欢迎访问 https://github.com/kirklin/postcss-px-conversion

lisonge commented 7 months ago

你的库使用 import 在 vite 引入直接报错 不存在默认导出,你在 index.ts 混用了 cjs ,导致生成的 dist/index.mjs 没有默认导出

kirklin commented 7 months ago

你的库使用 import 在 vite 引入直接报错 不存在默认导出,你在 index.ts 混用了 cjs ,导致生成的 dist/index.mjs 没有默认导出

感谢反馈,已修复

lisonge commented 7 months ago

image

没看懂为何你要执着往 esm 加入 cjs 的内容, esm 作用域下并不存在 module 变量,仍然是会报错的

image

你已经在 package.json 配置了 exports 字段,cjs 会自动取加载 dist/index.cjs ,esm 会自动加载 dist/inde.mjs

没看懂为啥还需要在 index.ts 更改 module 对象

adoin commented 6 months ago

vben 那边也遇到过插件官方不搞适配,然后也是你!英雄!

kirklin commented 6 months ago

vben 那边也遇到过插件官方不搞适配,然后也是你!英雄!

哈哈哈,无处不在。

adoin commented 6 months ago

vben 那边也遇到过插件官方不搞适配,然后也是你!英雄!

哈哈哈,无处不在。

好像都在福州呀,有没有什么技术讨论群啥的(顺便看看工作机会)