🌐 webpack production and development environments

  Рет қаралды 5,628

Brad Garropy

Brad Garropy

Күн бұрын

Пікірлер: 13
@prabhat.raushan097
@prabhat.raushan097 5 ай бұрын
explained very well.. thanks a lot..👌🏻
@udovyk
@udovyk 2 жыл бұрын
Thank you for the video. Weird that I'm the first to comment. Hope you continue to work on this youtube channel with this kind of quality. :)
@joshuadancey5031
@joshuadancey5031 Жыл бұрын
Are there any more considerations when using Typescript. Are the same steps essentially the same?
@bradgarropy
@bradgarropy Жыл бұрын
When it comes to splitting production and development environments, there is no difference when it comes to TypeScript. However, if you'd like to use webpack to compile TypeScript, you'll have to add babel-loader for .ts files with the @babel/preset-typescript preset configured.
@joshuadancey5031
@joshuadancey5031 Жыл бұрын
@@bradgarropy thanks for the response, good to not run off and overcomplicate things for myself
@Nickdondo
@Nickdondo 2 жыл бұрын
Thanks for the video! Is there a way to render HTML on the page based on what mode its in. Like Have a Production flag if its in production?
@bradgarropy
@bradgarropy 2 жыл бұрын
You can look at process.env.NODE_ENV to determine what environment it's in, but on the client side that will be undefined. Typically all of that logic is done on the server side, and the frontend just renders what it is given.
@tabmax22
@tabmax22 2 жыл бұрын
my npm run build index.html takes me to my 404 page, why?
@bradgarropy
@bradgarropy 2 жыл бұрын
Do you have a repository or some environment where the issue can be reproduced? The build command shouldn't open a browser and navigate anywhere, were you perhaps using the "webpack serve" script instead? If you'd like better / faster help, join my Discord here: bradgarropy.com/discord
@tabmax22
@tabmax22 2 жыл бұрын
@@bradgarropy The build command doesn't open the browser, it creates a build folder with the production version. However, when I manually open the index.html file in the production version, it takes my to my 404 page. I have joined the discord I shall post a repo there
@bradgarropy
@bradgarropy 2 жыл бұрын
Taking a look now!
@AnweshAdhikari
@AnweshAdhikari 2 жыл бұрын
Жыл бұрын
Very interesting, but understood nothing.
🌐 webpack environment variables
5:16
Brad Garropy
Рет қаралды 10 М.
Webpack Production and Development
10:49
WittCode
Рет қаралды 1 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 28 МЛН
React Webpack Setup From Scratch
20:53
Code With Bubb
Рет қаралды 60 М.
🌐 webpack loaders | css
7:29
Brad Garropy
Рет қаралды 6 М.
Qwen Just Casually Started the Local AI Revolution
16:05
Cole Medin
Рет қаралды 69 М.
Explains Module Bundlers in 3 Levels of Difficulty
18:35
lihautan
Рет қаралды 13 М.
How to OVER Engineer a Website // What is a Tech Stack?
11:20
Fireship
Рет қаралды 2,5 МЛН
Learn Webpack For Production - Part 1
34:15
Coding Mastery
Рет қаралды 3,1 М.
How to structure a JS/TS monorepo (From Zero to Turbo - Part 1)
11:58
How to Use Environment Variables in React
9:36
Eric Murphy
Рет қаралды 50 М.