An Interest In:
Web News this Week
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
August 27, 2021 08:24 pm GMT
Original Link: https://dev.to/marcinwosinek/how-to-quickly-start-a-webpack-project-381i
How to quickly start a webpack project
In this article, I'll show a simple way to start a webpack project with degit
degit
degit is a tool that lets you take another repository from GitHub and use it to scaffold your project. You can see it being used in serious projects such as SolidJS.
webpack-starter
Since I started working on this blog, I created more than 10 repositories with simple applications build with webpack. As I try keeping the code rather minimalistic, in most cases, all the projects end up almost the same. So today, I created a starter project to save me few seconds when starting new demo projects.
Usage
$ npx degit how-to-js/webpack-starternpx: installed 1 in 0.671s> cloned how-to-js/webpack-starter#HEAD$ npm installnpm notice created a lockfile as package-lock.json. You should commit this file.added 121 packages from 158 contributors and audited 121 packages in 3.164s17 packages are looking for funding run `npm fund` for detailsfound 0 vulnerabilities$ npm run build > [email protected] build /home/marcin/workspace/github/webpack-starter-demo> webpackasset main.js 22 bytes [compared for emit] [minimized] (name: main)./src/index.js 23 bytes [built] [code generated]WARNING in configurationThe 'mode' option has not been set, webpack will fallback to 'production' for this value.Set 'mode' option to 'development' or 'production' to enable defaults for each environment.You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/webpack 5.51.1 compiled with 1 warning in 186 ms
The resulting application does nothing but says hello in the development console.
Links
Summary
In this article, I have presented a simple project started for the webpack application.
Original Link: https://dev.to/marcinwosinek/how-to-quickly-start-a-webpack-project-381i
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To