Hello campers , I spent the whole day trying to figure out how to solve this problem in the screenshot below .
Webpack is not working ,and the bundled file is not produced here .
I checked the main attribute in json file and it is referring to the file wich import the other js files .
so what should I do .
thanks in advance .
What’s the path to your “src” folder?
From the looks of your editor screenshot, it doesn’t seem like you have a webpack.config.js
file and your src directory only has HTML files. By default, with no config, Webpack will only work with JavaScript files. If you want Webpack to work with HTML files you have to use something like html-loader.
Why not just clone or download the repo as is, install the dependencies, then use the npm scripts (npm run start
or dev
).
I used the same method in another folder and it is worked , but in this project it seems that something is missed
Why did you only download the src folder?
-
Install git.
-
Run git clone https://github.com/mohssineAboutaj/weight-tracker-app.git
from the command line.
-
cd into the weight-tracker-app
folder.
-
Run npm i
-
Run npm run dev
the last version of webpack is with zero config
Not entirely true, while for some basic usage, compiling multiple JavaScript files sure, but not any other type of file, or if your JavaScript contains JSX, or for files that are not JavaScript, if you want something that is more zero-config there is always parcel.
I thank you so much , I did not know that Parcel is another module bundler , I am still learning webpack , maybe this issue is so easy , I couldn’t figure out how to install loaders I ll go step by step because module bundlers are still new to me .
Guyz,
In which part of this camp we can learn webpack ?