DianaSuvorova / rollupSquared

rolling up rolled up application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rolling rolled up application.

Vanilla Rollup can only support the ESM format. So one can either include rollup-plugin-commonjs for upstream dependency. Or generate both UMD and ESM bundles for the base lib.

  1. yarn rollup creates ./src/index_rolledUp.js and ./src/index_rolledUp.mjs from ./src/index.js
  2. ./src/indexSquared.js uses ./src/index_rolledUp.mjs. Rollup will default to .mjs whenever available.
  3. yarn rollupSquared to bundle ./dist/index.js

All based on this answer.

Thanks!

About

rolling up rolled up application


Languages

Language:JavaScript 100.0%