npm install
to install all of the dependencies.npm start
will run the Nollup dev server.npm run build
will use Rollup to generate a production bundle.
Make sure you have ran npm install
in the root of the Nollup repository. Every example uses Nollup relatively with node ../../lib/cli.js
. In a normal project, this would be nollup
.
- Uses Preact as the base framework.
- Supports HMR using
prefresh
. - Supports HMR for CSS styles.
- Config shows how to use different plugins for dev and prod.
- Note that plugins never write to disk during dev.
- Uses React as the base framework.
- Supports HMR using
react-refresh
. - Supports HMR for CSS styles.
- Uses CommonJS plugins that supports HMR by not parsing out dynamic
require
calls. - The alternative CJS plugin also allows for
require
inside ES modules. - Uses replace plugin because of
process.env.NODE_ENV
not existing in browsers.
- Uses React as the base framework.
- Supports HMR using the old
react-hot-loader
. - Supports HMR for CSS styles.
- See above about CJS plugin.
- Uses React as the base framework.
- Uses dynamic import to generate separate file.
- Demonstrates HMR working across multiple generated JavaScript chunks.
- Demonstrates Nollup CLI supporting multiple bundles to be generated.
- Both bundles are able to use HMR.
- Demonstrates the
emitFile
API to emit a custom chunk. - Custom chunk is created using a custom plugin to emit web workers as separate files.
- Demonstrates
external
option to access global variables iniife
format.
- Demonstrates big libraries with circular dependencies (
moment
) working in Nollup.
- Demonstrates how to use
publicPath
for enabling single page applications to work in a subdirectory.
- Although not recommended, Nollup works with the old Rollup style projects that emit to the
public
directory.