-
# 0302
## ES6
1.用let宣告就像原生的var,唯一的差別是var的scope是function,let的scope是{}。用const宣告則無法再改變assign的值
2.以下是arrow function範例,兩個function是相同的
```
var add = function (a, b) {
return a+b;
}
var add = (a…
-
缘由: 用 spm 配置 `"babel": {}` 来使用 es6 语法开发。 super 不放在 constructor 第一行报错。
ES6 强制规定了 super 必须在 constructor 的第一行? 我只知道 Java 是这样规定的
还是 babel 做的约定 ?
在 Backbone.View 的事件代理 delegateEvents 中,
只有 super 写在 eve…
-
Greets,
I like this project! I'm curious how hard it would be to add JSPM (www.jspm.io) support. It's a package manager on the edge of popularity and having increasing uptake. While it manages / inst…
-
My webpack.config.js:
```
...
resolve: {
modulesDirectories: ['node_modules','bower_components'],
},
plugins:[
new webpack.ResolverPlugin(
new webpack.ResolverPlugi…
-
I get 404s when my tests try to reference SystemJS modules (conf files below). E.g.,
```
Error: XHR error (404 Not Found) loading http://localhost:9876/lib/github/angular/bower-angular@1.4.4.js
```
…
-
There is a babel-upgrade tool to automate upgrade and full changes in babel 7 here https://babeljs.io/blog/2018/08/27/7.0.0
We'd like to remove babel 6 from next version of debian and switched to u…
pravi updated
3 years ago
-
The output of using `babel-plugin-relay` uses `require`, and the output of `relay-compiler` uses `module.exports`.
I'd like to request that there be an option to use ES6 `import` statements instea…
-
Hi,
I have a bug with es6-promise in my react-native project an I am not sure how to solve it. I am even not sure if it's a real bug or my fault since the error message is meaningless to me. The …
-
.babelrc是来设置转码和插件的,presets设置转码规则,plugins设置插件
babel-cli是命令行转码
babel-node是babel-cli自带的命令,提供REPL环境的
babel-register 是改写require命令的,使用它之后,require 加载js,jsx,es,es6的文件都会先用babel转码
babel-register只会对…
-
The grunt-babel plugin generates the .map files mapping back to the ES6 source files but when trying to combine this with grunt-contrib-concat/grunt-contrib-uglify, I can only get a mapping back to th…