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 Жыл бұрын
Are there any more considerations when using Typescript. Are the same steps essentially the same?
@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 Жыл бұрын
@@bradgarropy thanks for the response, good to not run off and overcomplicate things for myself
@Nickdondo2 жыл бұрын
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?
@bradgarropy2 жыл бұрын
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.
@tabmax222 жыл бұрын
my npm run build index.html takes me to my 404 page, why?
@bradgarropy2 жыл бұрын
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
@tabmax222 жыл бұрын
@@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