After webpack packages the classes in ES6, how should you use the classes in the original ES6?

  1. I packed ES6"s class, in webpack and added
to config.
      library: "libraryName",
      libraryTarget: "umd",
      umdNamedDefine: true

the packaged JS also contains

function webpackUniversalModuleDefinition(root, factory) 

how do I use the methods of classes in ES6?

Mar.25,2021

import and export default

Menu