Webpack has error in:Module not found: Error: Can't resolve 'application' in "main.js"

const application = require(“application”);

WX20191010-205342

I’ve solved the problem:
webpack.config.js:

module.exports = {
  externals: {
    application: "application"
  },
}

Thanks for posting the solution here. Yes. You have to put XD modules in the externals property.