UNPKG

luy

Version:

所谓类```React```框架就是**和React用法一模一样**的框架。其实当初制造这个框架的目的是为了能更好的学习React内部结构,了解其原理而制作的玩具。但是随着框架的渐渐成长,代码越来越多,我还是决定将其发展下去. ![](https://github.com/215566435/Luy/blob/master/luy%20icon2.jpg?raw=true)

26 lines 835 B
// 新建.babelrc { "presets": [ ["es2015", {"modules": false}], // webpack现在已经支持原生的import语句了, 并且将其运用在tree-shaking特性上 "stage-2", // 规定JS运用的语言规范层级 // Stage 2 是 "草案", 4 是 "已完成", 0 is "稻草人(strawman)"。 // 详情查看 https://tc39.github.io/process-document/ "react" // 转译React组件为JS代码 ], "plugins": [ "transform-runtime", // "react-hot-loader/babel", "transform-object-rest-spread", ["transform-react-jsx", { "pragma": "React.createElement" // 默认 pragma 为 React.createElement }], "external-helpers", "transform-flow-strip-types", "syntax-flow", "transform-es2015-modules-commonjs" // 开启react代码的模块热替换(HMR) ] }