A typical front end project setup.
In the repository root directory:
npm install
npm run dev
Intended is to take the most standard tooling at the time of writing.
Webpack
: Is the "runtime": It 1) serves the files onhttp://localhost:8080
, but also 2) orchestrates the pipeline to transform source files to servable files.npm
as 1) the CL interface and 2) to manage frontend packages (at development time): It downloads libraries and keeps track of their versions and dependencies (inpackage.json
andpackage-lock.json
).Babel
is a package that contains the logic to convert from ES5+ to browser-compatible ES5.
More precisely, the dependencies in package.json
:
webpack
to bundle all the moduleswebpack-cli
to run webpack from cliwebpack-dev-server
to serve the compiled file.css-loader
to configure webpack for compiling the cssstyle-loader
loads all the css in the head of HTMLbabel-loader
to configure webpack for using babel@babel/core
to transpile the jsx to js@babel/preset-env
to configure the transpiler for old browser
- Amazing "what and why" of front end development tooling.
- Tutorial about how to bootstrap a React project
- SASS for React?
- front end (implies that
JavaScript
is executed by the browser aka client-side, as opposed to server-side). - setup sums up that it is an actual project repository, but containing only the non-specific code.
- Possibly also related: boilerplate, development environment, project bootstraping.