Babel ie8 new ClassName throw'无法将类调用为函数'

时间:2016-04-06 02:01:03

标签: babeljs

我尝试了多种变体,但它们似乎都没有效果。有什么想法吗?

webpack.config.js:

{
            test: /\.js[x]?$/,
            exclude: /(node_modules|bower_components)/,  
            loader: 'babel',
            query: {
                presets: ['es2015-loose', 'stage-0'], 
                cacheDirectory: true, 
                //cacheIdentifier : '.babelrc', 
                plugins: ['transform-runtime']
            }
        }

js code:

import "babel-polyfill";

class CC{
constructor(x, y) {
    this.x = x;
    this.y = y;
}
}
var c1 = new CC(1,2);

提前致谢。

0 个答案:

没有答案