The problem of introducing non-directory files into wepack

clipboard.png

![...]

clipboard.png

when webpack wants to introduce an external questionnaire, it is found that an error is reported. How to solve this problem?

May.26,2021

the landlord did not create a .babelrc file.
first install the corresponding dependent files,

npm install babel-plugin-transform-runtime babel-preset-env babel-preset-stage-2 --save-dev

.babelrc the details of the file are as follows:

  "presets": [
    ["env", {
      "modules": false,
      "targets": {
        "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
      }
    }],
    "stage-2"
  ],
  "plugins": ["transform-runtime"]
}
Menu