不太了解less和webpack。
@import '~antd/lib/style/themes/default.less';
请问这一句的@import 和~antd是什么意思?
不太了解less和webpack。
@import '~antd/lib/style/themes/default.less';
请问这一句的@import 和~antd是什么意思?
3 回答1.9k 阅读✓ 已解决
1 回答1.6k 阅读✓ 已解决
4 回答1.6k 阅读✓ 已解决
2 回答2.5k 阅读✓ 已解决
1 回答2.5k 阅读✓ 已解决
2 回答1.3k 阅读✓ 已解决
2 回答1.6k 阅读✓ 已解决
关于@import:
sass关于@import的介绍
Sass extends CSS's @import rule with the ability to import Sass and CSS stylesheets, providing access to mixins, functions, and variables and combining multiple stylesheets' CSS together. Unlike plain CSS imports, which require the browser to make multiple HTTP requests as it renders your page, Sass imports are handled entirely during compilation.
Sass imports have the same syntax as CSS imports, except that they allow multiple imports to be separated by commas rather than requiring each one to have its own @import. Also, in the indented syntax, imported URLs aren’t required to have quotes.
关于~antd:
~ 的写法表明当前用的是别名引入, webpack的alias 应当有对应的配置, 就和常用的@/path一样