Reputation: 3926
I am trying to get a React project to work with being packaged using Webpack and Babel using @babel/pollyfill. When I try to run on IE I get the following error...
SCRIPT1002: Syntax error
It is failing here...
class HealthCheck extends react__WEBPACK_IMPORTED_MODULE_0__["Component"]{
render(){
return _HealthCheck_jsx__WEBPACK_IMPORTED_MODULE_1__["HealthCheckTemplate"].call(this);
}
}
So I am guessing it can't handle class so how do I fix this?
Upvotes: 1
Views: 2626
Reputation: 852
Try using @babel/plugin-transform-classes .
https://babeljs.io/docs/en/babel-plugin-transform-classes
Upvotes: 1