Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 1.32 KB

README.md

File metadata and controls

36 lines (22 loc) · 1.32 KB

I created this repo to test out Nano React App, which is the new hotness that has replaced the increasingly bloated—but still quite useful—Create React App. It was definitely easy to get up and running with this project, as described below.

nano-react-app-template

The template project for nano-react-app.

  • npm start — This will spawn a development server with a default port of 1234.
  • npm run build — This will output a production build in the dist directory.

Custom port

You can use the -p flag to specify a port for development. To do this, you can either run npm start with an additional flag:

npm start -- -p 3000

Or edit the start script directly:

parcel index.html -p 3000

Adding styles

You can use CSS files with simple ES2015 import statements in your Javascript:

import "./index.css";

Babel transforms

The Babel preset babel-preset-nano-react-app and a small amount of configuration is used to support the same transforms that Create React App supports.

The Babel configuration lives inside package.json and will override an external .babelrc file, so if you want to use .babelrc remember to delete the babel property inside package.json.