I'm starting with webpack:
My goal is to be able to take an entire folder where I have all my javascript and generate it in a minifiedcado build.js, what I can not find, is how to make the entry of my webpack.conf a folder and not a file, and in the case of being a file, as I write in that file all the other files that must be included.
Until now I was doing this with Koala, I took a file with the files that I had to include and then when compiling I had only one .js file minifycado.
Sure this is possible with webpack but I can not find a way to configure it
My current configuration is as follows:
const path = require('path');
const paths = {
DIST: path.resolve(__dirname, 'public/frontend/js'),
JS: path.resolve(__dirname, 'resources/assets/frontend/js'),
};
// Webpack configuration
module.exports = {
mode: "development", // "production" | "development" | "none"
entry: paths.JS, // path donde se ejecuta el inicio de la compilacion, path de entrada
output: {
path: paths.DIST,
filename: 'app.bundle.js'
},
};
Which ends up throwing me an error by the value of Entry
ERROR in Entry module not found: Error: Can not resolve