This article, which is about webpack-node-externals, was originally written in python, but we now use it for our production purposes.
You should really read the rest of the article.
You might have noticed that we have a new article that is more than just a collection of techniques. We now also go into how to deal with the ever-growing problem of nodejs modules.
The introduction to webpack-node-externals from the same author, Ryan Evers, explains how we are integrating webpack into our node.js codebase to fix common problems when developing code that references modules that are not in our package.json. It’s a very clever solution that we all know but have never tried before. We’ll talk about other things we’ve learned along the way, too.
Now thats a smart idea. Ryan and his team have managed to get webpack to work exactly as expected while also fixing the problems that nodejs modules cause. This means that you can now, much more easily, create node.js modules without the need for the complicated and error-prone process of editing the source of an existing project.
What is webpack-node-externals? It’s a new feature in webpack that enables you to use the node.js modules by simply including a single line of code that you want to use in your webpack config. The modules are then compiled into a single file and then shipped with your bundle. This is a very clever solution to the problem of not having a single-file bundle that includes all of the necessary node modules. It’s a big step in the right direction.
It also allows you to use the node modules as a dependency when doing some of the more complex webpack stuff, such as making your project fully compatible with various React and other JS frameworks. The biggest drawback is that it will create a lot of files, and that can cause some problems if you are building for production.
I’m not sure how I feel about the idea of having a single file that is a bundle of all the node modules, but it does have the advantage of allowing you to use the node modules as a dependency. It’s a good step, but it seems to me that in the future we’ll be using the same approach for React and other frameworks.
For me the biggest advantage is that it allows you to use the bundled node modules as a dependency instead of requiring them.
My experience has been that webpack is great for quickly building a small project, but then you have to maintain it as a separate bundle. I think that you are right that you can build a single file that has all the node modules and then use webpack to import them. But I think it would be nice if you could have node modules as a dependency, and have a single bundle of all the node modules.