We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Since postcss/postcss@106cfa2
今天开讲 PostCSS,那就得从 ./index.js 说起,万事开头简单,./index.js 就两行:
./index.js
require('babel-core/register')({ extensions: ['.es6'] }); module.exports = require('./lib/postcss');
什么意思呢?
第一行引入了 babel 的注册器,这样之后 require 的内容都将被 babel 转换为 es5 的格式,而 extensions 则指定让 babel 只转换 .es6 后缀的文件。
extensions
.es6
这个 ./index.js 大概只是开发时用的,开发者在发布新版本的时候会把所有 .es6 文件编译成 es5 再发布,这样做的好处是开发时免去了编译这一环节,提高效率。
es5
好了,今天第一讲很简单,下期再见!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Since postcss/postcss@106cfa2
今天开讲 PostCSS,那就得从
./index.js
说起,万事开头简单,./index.js
就两行:什么意思呢?
第一行引入了 babel 的注册器,这样之后 require 的内容都将被 babel 转换为 es5 的格式,而
extensions
则指定让 babel 只转换.es6
后缀的文件。这个
./index.js
大概只是开发时用的,开发者在发布新版本的时候会把所有.es6
文件编译成es5
再发布,这样做的好处是开发时免去了编译这一环节,提高效率。好了,今天第一讲很简单,下期再见!
The text was updated successfully, but these errors were encountered: