Skip to content

Latest commit

 

History

History
151 lines (110 loc) · 14.3 KB

webpack.md

File metadata and controls

151 lines (110 loc) · 14.3 KB

drawing

Today we are going to talk about eslint and webpack. This is not going to teach you how to install eslint in your project, I will assume that you already did.

In this tutorial, you'll learn how to set up webpack to work with static files in a development environment and how to configure it for multiple use cases.

Do you leave your keys inside your car in a big parking lot? If not, then why do you expose your API_KEYs in your Github projects?

What is Webpack?

Webpack is a module bundler for JavaScript as well as HTML applications. It grabs modular pieces of code compartmentalized in folders. Followed by reconstituting them into a compiled form. Then it's read as a whole by the application. You must be thinking, "Why break up a working code?" As your code scales, so does its complexity. Finding a correlation between each block becomes a challenge.

If you plan to enhance your experience in frontend development, ViteJs is the next-generation tool you should consider. Let's understand why Vite is faster.

"Browser based bundler" is a very interesting topic.

For example, can we compile the webpack code in the browser instead of the server's nodejs environment? The advantage of this is that we don't need the server's resources for compilation.

There are different solutions to this problem. For example, codesandbox, which defines a browser-based compilation strategy, can be used to package reacts, vue, etc. in the browser. It can also be easily understood that codeandbox does a browser version of webpack.

But the question is, can we execute webpack in the browser instead of doing a new one? Even implementing some webpack-based libraries?

There is a very early webpack issue discussing it . But this demo is too old to run the latest version of webpack.

I am wondering if we can do a browser environment to simulate running Node.js. Node.js and Chrome is both v8, and many of the Node.js lib code can be executed in Chrome. In addition, I found some cool libraries, such as BrowserFS, memfs, rollup-plugin-node-builtins, etc. These libraries can help us build this environment. But there is a key module, Node.js "module" is not available, we need to modify it from Node.js. Node.js supports cjs and esm, but to simplify the problem, I only develop the cjs module for the time being. Next, combine all the modules and try to run the simplest Node.js demo.

The 3 key decisions that makes Vite faster than Webpack.

How to use TypeScript's ambient module feature for cross-sharing micro-frontend imports using single-spa.

Full Disclosure:

We migrated our web app’s codebase from Webpack 4 to Vite for one simple reason: speed.

Pretty much just what the headline says: A list of 21 JS bundlers.

The Micro Frontend style of architecture design does for the frontend of an application what microservices do for the backend.

The new HTML Bundler plugin makes Webpack setup incredibly simple, as all the configuration happens in one place.

This article is for those who use ES6 syntax along with Webpack. After I started using Javascript with Webpack I met a lot of unexpected errors. All of them were because of ES6 syntax usage. Those of you who decided to start javascript using "Classes" or you need to use ESlint I'll try to explain how to save some time. In short, it's all about loaders.

One of the most crucial maxims that I internalized during my career in web engineering is that every technical decision embodies tradeoffs. No matter the benefits, you’ll always face certain costs and restrictions: be it creating an abstraction in your code, scaling a distributed data store or choosing between web and mobile app format for the initial product launch.

A few of you might still remember the post "How it feels to learn JavaScript in 2016" - It's 8 years later; a lot should have changed, shouldn't it?

webpack is a flexible bundler that provide you with tons of options and configuration so you can personalize your JavaScript projects, but with great power comes a great mess... err, I mean, great responsibility when configuring.

And why you should too

Are you Developer doing FrontEnd? Are you using Webpack?

I’ve had a hard time figuring out how to get a Phaser 3 Game deployed on Heroku. This is why I’m going to show you how to create a brand new node.js project, integrate it with Webpack and Phaser 3 game engine using Express as a Webserver, and deploy it to Heroku, so we can see it live.

Learn how to use ONNX Runtime Web to deploy machine-learning models natively to the browser.

A step by step guide on how to create a React project from scratch, with TypeScript and Webpack.

I am writing this article to help people that are just starting to learn Phaser 3 and need extra support when deploying their game to production. This tutorial will focus on configuring your app with Webpack, I will run through each line of code explaining what they are doing and why they are important. This tutorial won’t show you how to set up your Phaser 3 game, in that case I recommend you to start with this template and jump to configuring your prod.js in this article (Step 5).

Webpack article written by OpenAI model gpt-3

Why Another Boilerplate

How to create a Ruby on Rails application with Postgresql and React with Docker Compose

One of the areas that a web developer will spend the most time learning is a build system or process to streamline their directory own local development process. When I first started working with task runners I was using Grunt to automate tasks, such as compiling Sass, bundling JavaScript, and optimizing images. However, what amazed me was that all the same tasks that I ran locally to develop could be run before deploying to a production website using a Git repository.

All of us have used CRA(create-react-app) when we worked with React. Its an awesome tool. It gives us just to focus on React by letting take care of the configuration. Today we are going to learn how to setup Webpack and Babel for our React app.

Rails 6 is out for few months now, I happen needed to do a project with it. But I found I can't use the same way to integrate Bootstrap 4 & Font Awesome 5 in Rails 5 in my new project. Because in Rails 6, it start to use "webpack" as default Javascript complier.

Everything described in the article is highly experimental and I am cutting corners everywhere. By no means I recommend to use any of that in production :)

Simple Streaming SSR React with Styled-Components and Parcel

Leverage webpack module federation to build a scalable micro-frontends architecture.

Why Universal NPM Modules?

Working out the best way to serve up files to your users can be a tricky business. There’s so many different scenarios, different technologies, different terminology.