rollup/rollup-starter-lib

For reference how is const howLongTillLunch = require('..') working?

iannazzi opened this issue · 2 comments

I am assuming
const howLongTillLunch = require('..');
reads package.json
and pulls
dist/how-long-till-lunch.umd.js from browser

Can someone confirm?

from my understanding no. Require should load the cjs version and not the umd one. From what i understand umd is supposed to be served to unpkg or another cdn. And its intended to be used with a <script src="...">

For nodejs require('..') will read package.json and read the file specified by main.