Webpack output to the wrong directory

Hey guys, I have a quick question. I've got this webpack setup
const path = require('path')

module.exports = {
"mode": "development",
entry: {
main: './src/module.js'
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
]
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, '/assets')
}
}
const path = require('path')

module.exports = {
"mode": "development",
entry: {
main: './src/module.js'
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
]
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, '/assets')
}
}
And I would like to compile my output in the 'assets' folder but when I run npm start it rather compile to the wrong directory
'/public' directory
asset main.js
'/public' directory
asset main.js
output after compiling. I'd want it to be compiled here
'/assets' directory
'/assets' directory
Thanks for the answers🙌🏼
1 Reply
ei
eiOP3y ago
btw fixed 😅
Want results from more Discord servers?
Add your server