Invalid Configuration Object Output.path Is Not An Absolute Path
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 d
Solution 1:
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
};
Post a Comment for "Invalid Configuration Object Output.path Is Not An Absolute Path"