【发布时间】:2020-01-17 16:59:11
【问题描述】:
从这个讨论开始Edge: SCRIPT1028: Expected identifier, string or number 我不知道如何使用 babel 解决问题。 我面临的问题是在我正在使用的模块(不是我的类)内部,所以我无法(轻松地)对代码进行修补。
我正在导入一个类:
import { Class1 } from '@eds/vanilla'; <-- This is not mine
that his then importing another class
./src/public/eds-components/charts/bar-charts/Class1.js
That is importing :
import { ColorScale } from '../common/ColorScale';
export class ColorScale {
/**
* Setup color scale properties
* @param {Object} props - The properties to initialize the color scale
* @param {Array} props.colors - The array of colors
*/
constructor(props) {
props = {
...props
};
this.length = props.length || 15;
this.colors = props.colors || this.generateColorMatrix(this.length);
}
我如何使用 babel/polyfills 或其他任何东西来解决不受我控制的模块上的问题?
【问题讨论】:
标签: node.js angular babeljs microsoft-edge polyfills