Step1:

npm install babel-plugin-dynamic-import-node --save-dev
Copy the code

Step2:

Modify the babel.config.js file

module.exports = {
  presets: [
    '@vue/app'
  ],
  env: {
    development: {
      plugins: ['dynamic-import-node']
    }
  }
}
Copy the code