I try compile ".ts" to ".js" with webpack but getting this error, how can I fix this?
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
requires an absolute path, but you're giving it a relative path ./dist
. You need to convert it to an absolute path, for instance by using path.resolve
:
const path = require('path');
module.exports = {
output: {
path: path.resolve(__dirname, 'dist'),
// Your other output options
},
// Rest of your config
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With