I recently completed a tutorial on webpack without typescript, and then dove into another one on configuring webpack with typescript from this link. However, when I tried to build the project using npm run build
as instructed in the second tutorial, I encountered the following error:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.resolve.extensions[0] should not be empty.
Despite my efforts, I have not been able to find a solution to this issue anywhere online.
In case it helps, here is a snippet of my webpack.config.js file:
module.exports = {
entry: './main.ts',
output: {
filename: './bundle.js'
},
resolve: {
extensions: ['', '.ts']
},
module: {
loaders: [
{ test: /.ts$/, loader: 'awesome-typescript-loader' }
]
}
};
Any guidance or suggestion would be greatly appreciated!