I'm getting the following error when trying to set up webpack for CSS Modules...
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.output.path: The provided value "build" is not an absolute path! -> The output directory as absolute path (required).
Following are my webpack.config.js and package.json files.
webpack.config.js
module.exports = {
entry: './src',
output: {
path: 'build',
filename: 'bundle.js',
},
};
package.json
{
"name": "css-modules",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack && open index.html"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"webpack": "^4.16.1",
"webpack-cli": "^3.0.8"
}
}
If anyone could help it would be appreciated.
Thanks!