Vue2 and iview, have reported an error in ie11 and have already used babel-polyfill

as shown in the figure:
clipboard.png
":" :

clipboard.png

:

clipboard.png

:

clipboard.png

clipboard.png

Apr.07,2021

did you report an error after compilation? Will you report an error during development


babel is not completely caused by the conversion, which is not defined and can not be seen for the time being. Basically, I can't get rid of it, and the conversion is not in place.
I'm going to explode the pot that iview introduces on demand. Our project has been the introduction of the whole family bucket has not found this problem.
there is no problem with on-demand introduction through babel settings under chrome, but hell with ie11.
the current solution is the introduction of family buckets. Introduce the one in babellrc on demand and remove


clipboard.png

at present, in order to solve the iview babel problem after demand loading, we can only define the babel file path manually

{
    test   : /\.js$/,
    use    : 'babel-loader',
    include: [resolve('node_modules/iview/src'), resolve('node_modules/webpack-dev-server/client')]
}
Menu