-
Star
(140)
You must be signed in to star a gist -
Fork
(35)
You must be signed in to fork a gist
-
-
Save rupeshtiwari/e7235addd5f52dc3e449672c4d8b88d5 to your computer and use it in GitHub Desktop.
Thanks for this 👍
Nice explaination . Thanks
Thanks @yxney-mayank and @ArtursTimofejevs
This is awesome. Thank you!
Slam dunk! I wish everyone wrote technical docs like this 👍
Thanks @charleslukes and @bruceharrison1984 I am glad this is helpful.
Warning
ts-loader uses tsc, the TypeScript compiler, and relies on your tsconfig.json configuration. Make sure to avoid setting module to "CommonJS", or webpack won't be able to tree-shake your code.
The tsconfig.json will still work, but the caveat is still good to keep in mind.
@rupeshtiwari Thank you for your great tutorial!
In this chapter "Creation of the Project Draft Document", I want to learn more about it, but your link seems to have been broken.
Could you fix it?
Thanks
At the very first steps of initialization, at "Creating Webpack.config.js file" step, and after typing "npx webpack-cli init" I get the following question:
[webpack-cli] For using this command you need to install: '@webpack-cli/generators' package. [webpack-cli] Would you like to install '@webpack-cli/generators' package? (That will run 'npm install -D @webpack-cli/generators') (Y/n)
I guess should continue by installing the generators package...
Which leads me to very different questions:
- Which of the following JS solutions do you want to use? (Use arrow keys)
none
ES6
Typescript
- Do you want to use webpack-dev-server? (Y/n)
- Do you want to simplify the creation of HTML files for your bundle? (Y/n)
- Do you want to add PWA support? (Y/n)
- Which of the following CSS solutions do you want to use? (Use arrow keys)
none
CSS only
SASS
LESS
Stylus
- Do you like to install prettier to format generated configuration? (Y/n)
- Pick a package manager: (Use arrow keys)
npm
yarn
pnpm
Which then asks me to overwrite some files; like the package.json for example.
It was very early in those steps but I don't think I misstepped anywhere. Did I?
npx webpack-cli init doesn't work in later versions
Removed in favour of create-webpack-app apparently https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md#600-2024-12-19
Which replaces this entirely? Though I was hoping to add webpack to an existing project with this, but this creates a whole app from a template?
In Step 1,
npm i -D wepack-cli webpack type...should probably benpm i -D webpack-cli webpack type(wepack vs webpack), right?Thanks for this!