0.1.44 • Published 2 years ago

rollup-hello-world2 v0.1.44

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Don't install or use this library yet; I'm just playing with build-packages right now.

Give it a few days, thanks everyone.

Issues with our build process:

  1. if you do an default import, like import something from 'rollup-hello-world2' the typescript compiler will think it's going to work, and even provide type definitions for the something object, such as something.functionName() => void, however at runtime this will completely fail because our library has no default exports. Honestly, I have no idea how to provide default exports, and I'm giving up on the idea entirely; in that case, any developer using the library's IDE should throw a clear error indicating that their is no default export, warning them ahead of time. Currently it does not do this.

  2. For CJS imports done in Typescript (.ts files), the type-definitions are missing and are simply defined as 'any'. A CJS import is something like const something = require('library-name') or const {functionName} = require('library-name'). Interestingly enough, these type definitions are PRESENT for .js files doing the same identical import statement. How bizarre.

Scripts: "postbuild": "echo {\"type\":\"commonjs\", \"types\":\"../../types/index.d.ts\"} | json > dist/cjs/package.json && echo {\"type\":\"module\", \"types\":\"../../types/index.d.ts\"} | json > dist/esm/package.json",

Note: for usability of the library, I believe it is slightly better to have named exports in the index.ts rather than wild-card * exports. However it's not a huge difference.

0.1.44

2 years ago

0.1.43

2 years ago

0.1.42

2 years ago

0.1.41

2 years ago

0.1.40

2 years ago

0.1.38

2 years ago

0.1.37

2 years ago

0.1.36

2 years ago

0.1.35

2 years ago

0.1.34

2 years ago

0.1.33

2 years ago

0.1.32

2 years ago

0.1.31

2 years ago

0.1.30

2 years ago

0.1.29

2 years ago

0.1.28

2 years ago

0.1.27

2 years ago

0.1.26

2 years ago

0.1.25

2 years ago

0.1.24

2 years ago

0.1.23

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago