[Solved] ERROR in ./src/main.ts Module not found: Error: Can‘t resolve ‘xxx‘

ERROR in ./src/main.ts Module not found: Error: Can’t resolve ‘xxx’
Could not find .ts module
You need to configure in webpack.config.js:

resolve: {  //The file extension needs to be added ts
   extensions: ['.ts', '.js'],
 },

Exposure after definition

Introduction and application

Read More: