Introduction to Neutrino
I discovered Neutrino in the last year and it has become my preferred tool to bootstrap any JS project.
Here’s the definition of what Neutrino is from the project’s site:
[You can] create and build modern JavaScript applications with zero initial configuration.
Neutrino combines the power of webpack with the simplicity of presets.
For me, the main advantage Neutrino has, is that it removes the need to write webpack.config.babel.js configuration files and that starting a project is a simple wizard.
To get started it is as simple as this:
npx @neutrinojs/create-project <directory-name>
That will start a wizard that will help you select the stack you want:
Once the wizard completes you can change to that directory and start your project with npm start
; That’s it! You don’t need any configuration changes. The minimum number of files for your project to start are now in place.
Neutrino is opinionated and has a bunch of good defaults that works for both production and development. You can always customize the configuration and/or create your own presets.
If you want an example of:
- A basic React project with Neutrino check this .neutrinorc.js file
- A basic Koa project with Neutrino check this .neutrinorc.js file
If you want to learn more about Neutrino, Eli Perelman (original author of the project) wrote about Neutrino at hacks.mozilla.org. You can find the official documentation at https://neutrino.js.org.
I hope you give it a try!