L'objet de configuration invalide output.path n'est pas un chemin absolu

J'essaie de compiler ".ts" à ".js" avec le webpack mais en obtenant cette erreur, comment puis-je résoudre ceci?

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.output.path: The provided value "./dist" is not an absolute path!" 

output.path nécessite un chemin absolu, mais vous lui donnez un chemin relatif ./dist . Vous devez le convertir en un chemin absolu, par exemple en utilisant path.resolve :

 const path = require('path'); module.exports = { output: { path: path.resolve(__dirname, 'dist'), // Your other output options }, // Rest of your config };