babel ie8 new Class throw 'Cannot call a class as a function'

新手上路,请多包涵

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:

import "babel-polyfill";
class CC{
    constructor(x, y) {
        this.x = x;
        this.y = y;
    }
}
var c1 = new CC(1,2);

前辈门有没有遇到这种问题呢?

阅读 3.3k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题