UNPKG

365 BPlain TextView Raw
1#!/bin/bash
2#
3# Add package.json files to cjs/esm subtrees in dist
4# This is needed to allow one package to work with
5# commonJS for older node versions, and for using ES6 imports
6# for browsers, and newer versions of node
7#
8
9cat >dist/cjs/package.json <<!EOF
10{
11 "type": "commonjs"
12}
13!EOF
14
15cat >dist/esm/package.json <<!EOF
16{
17 "type": "module"
18}
19!EOF