Open kcramakrishna opened 3 months ago
I used openDevin to run some experiments and got some webpack files which are working but missing some important stuff. I attached the files below:
Please add the following to the below files: (I got them in one experiment but missed in the current experiment)
Some help: https://g.co/gemini/share/b893201e733e
I see that 'prod' has terser plugin. I found something interesting from Gemini: https://g.co/gemini/share/66a0104b1068 "Webpack 5: In Webpack 5 and later, the Terser plugin is included by default. You might not need to install it separately unless you require specific configurations."
I am not sure which version of webpack we are using. Please adjust accordingly.
Also please do a final sanity check before merging.
These files will unzip to current directory and not to separate folder. webpack..zip
The above is the output of this experiment: https://github.com/Digital-Assistant/Digital_Assistant_Client/wiki/Webpack-Configuration-Refactoring:-Testing-with-a-simple,-unsophisticated-prompt and will be missing some improvements. You will need to implement, multi-threading, caching, bundle-analyser.
Also attaching the webpack config in ts format. This is only for reference to see that openDevin did a decent job before we decided to leave the config file in js instead of ts. openDevin_Sonnet3.5_webpack.config.zip
Apparently it is general best practice to have the prod builds in 'dist' folder. Will make these changes and will also add 'dist' in ./gitignore so that it is convenient to developers. For 'prod', we can include 'dist' in commit and then release it.
Do we want to enable asset compression in webpack or in webserver ?
Need to implement 'best practices' to the current webpack config - separation of dev/prod/common, build speed optimisations etc.