dewfall123 / umi-plugin-tailwindcss Goto Github PK
View Code? Open in Web Editor NEWumi-plugin-tailwindcss
umi-plugin-tailwindcss
感谢作者做出这么好用的插件,十分的便捷.
在这里对作者说一句谢谢.
帮助我节省了很多时间.
感谢您辛勤的付出.谢谢.
umijs 2.x 可以用吗?? 怎么配置呢
使用这个插件后,不知道为啥webstrom 无法智能提示了?
antd pro 4 里面安装好没有效果
开启jit模式后,jit的特性不生效,原来普通的特性也失效了。
tailwind2.2有jit, 希望能添加支持
问题如标题,使用umi3的最新版本使用当前插件,jit模式无法生效,运行命令中已配置了TAILWIND_MODE=watch 。
最小复现仓库是 https://github.com/vaezc/umi-3-tailwind
TAILWIND_MODE=watch 也添加了
导至 transform rotate-45 等无法使用,必须另外新建 css 档
package.json
"tailwindcss": "^2.2.10",
"umi": "^3.5.17",
"umi-plugin-tailwindcss": "^3.1.5"
taikwind.config.js
module.exports = {
// mode: 'jit',
// jit document: https://tailwindcss.com/docs/just-in-time-mode
// purge: ['./src/**/*.html', './src/**/*.tsx', './src/**/*.ts'],
darkMode: false, // or 'media' or 'class'
theme: {},
variants: {
extend: {},
},
plugins: [
require('autoprefixer'),
],
};
缺少 -webkit-
前缀
.bg-clip-text {
- -webkit-background-clip: text;
background-clip: text;
}
能更新tailwind的版本么
基于 Ant Design Pro 做了下尝试,用了 less 文件。
@tailwind utilities;
.test {
@apply rounded-md bg-white p-4;
}
然后每次修改 @apply 里的内容,导致重新编译,用时较长(大约 20s 左右),这个是插件的问题还是 umi 的问题?
electron项目的main、renderer目录结构,因此设置了 APP_ROOT=src/renderer
。复现步骤:
tailwind.config.js
yarn build
打包输出的css文件引入了全部tailwind样式(2MB+)。但复制一份tailwind.config.js
到根目录后正常,感觉tailwind是直接读process.cwd()
了,插件层面应该有办法给tailwincss指定配置文件路径?
$ yarn add umi-plugin-tailwindcss -D
yarn add v1.22.5
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @ant-design/[email protected]" has unmet peer dependency "antd@^4.x".
warning "@ant-design/pro-layout > @ant-design/[email protected]" has unmet peer dependency "[email protected]".
warning "@ant-design/pro-layout > @ant-design/[email protected]" has incorrect peer dependency "react@^16.x".
warning "@ant-design/pro-layout > @ant-design/[email protected]" has unmet peer dependency "[email protected]".
warning "@ant-design/pro-layout > @ant-design/[email protected]" has incorrect peer dependency "react@^16.x".
warning "@ant-design/pro-layout > [email protected]" has incorrect peer dependency "[email protected]".
warning "@ant-design/pro-layout > [email protected]" has incorrect peer dependency "[email protected]".
warning "@umijs/preset-react > @umijs/[email protected]" has unmet peer dependency "@ant-design/icons@^4.0.0".
warning "@umijs/preset-react > @umijs/plugin-dva > [email protected]" has unmet peer dependency "[email protected]".
warning "@umijs/preset-react > @umijs/plugin-dva > [email protected]" has incorrect peer dependency "react@^16.8.4".
warning "@umijs/preset-react > @umijs/plugin-dva > [email protected]" has incorrect peer dependency "react-dom@^16.8.4".
warning "@umijs/preset-react > @umijs/plugin-dva > [email protected]" has unmet peer dependency "dva-core@^1.1.0 | ^1.5.0-0 | ^1.6.0-0".
warning "@umijs/preset-react > @umijs/plugin-locale > [email protected]" has incorrect peer dependency "react@^16.3.0".
warning "@umijs/preset-react > @umijs/plugin-antd > antd > [email protected]" has unmet peer dependency "dayjs@^1.8.30".
warning "@umijs/preset-react > @umijs/plugin-dva > dva > [email protected]" has incorrect peer dependency "react@^16.4.0".
warning "@umijs/preset-react > @umijs/plugin-dva > dva > [email protected]" has unmet peer dependency "react-router@^4.3.1 || ^5.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 28 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ @fullhuman/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
$ umi generate tmp
Specified Tailwind config file "E:\FrontEnd\typescript-react\umi-tailwind\tailwind.config.js" doesn't exist.
Error: Specified Tailwind config file "E:\FrontEnd\typescript-react\umi-tailwind\tailwind.config.js" doesn't exist.
at _default (E:\FrontEnd\typescript-react\umi-tailwind\node_modules\tailwindcss\lib\lib\registerConfigAsDependency.js:16:11)
at E:\FrontEnd\typescript-react\umi-tailwind\node_modules\tailwindcss\lib\index.js:85:58
at creator (E:\FrontEnd\typescript-react\umi-tailwind\node_modules\postcss\lib\postcss.es6:111:34)
at Object.fn (E:\FrontEnd\typescript-react\umi-tailwind\node_modules\umi-plugin-tailwindcss\dist\index.js:51:13)
at E:\FrontEnd\typescript-react\umi-tailwind\node_modules@umijs\core\lib\Service\Service.js:573:37
at Generator.next ()
at asyncGeneratorStep (E:\FrontEnd\typescript-react\umi-tailwind\node_modules@umijs\core\lib\Service\Service.js:108:103)
at _next (E:\FrontEnd\typescript-react\umi-tailwind\node_modules@umijs\core\lib\Service\Service.js:110:194)
at E:\FrontEnd\typescript-react\umi-tailwind\node_modules@umijs\core\lib\Service\Service.js:110:364
at new Promise ()
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
我用的是最新的tailwind, 开启了JIT, 在开发环境中, 如果添加了新的class, 插件没有重新编译
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.