diff options
| author | Kitson Kelly <me@kitsonkelly.com> | 2018-09-01 10:47:13 -0700 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-01 15:06:03 -0400 |
| commit | b3dac82887508b6d5098b970da40a5ba9420f797 (patch) | |
| tree | ec4d565d1372488aa5e6ee8b00505647461edbbf /rollup.config.js | |
| parent | f83aee02e66214853a008ebe4b5141405ac3a950 (diff) | |
Remove lib.globals.d.ts
Diffstat (limited to 'rollup.config.js')
| -rw-r--r-- | rollup.config.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rollup.config.js b/rollup.config.js index 299bdad92..3dbe29260 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -24,6 +24,12 @@ const tsconfigOverride = { } }; +// this is a preamble for the `globals.d.ts` file to allow it to be the default +// lib for deno. +const libPreamble = `/// <reference no-default-lib="true"/> +/// <reference lib="esnext" /> +`; + // this is a rollup plugin which will look for imports ending with `!string` and resolve // them with a module that will inline the contents of the file as a string. Needed to // support `js/assets.ts`. @@ -62,7 +68,9 @@ function strings({ include, exclude } = {}) { transform(code, id) { if (filter(id)) { return { - code: `export default ${JSON.stringify(code)};`, + code: `export default ${JSON.stringify( + id.endsWith("globals.d.ts") ? libPreamble + code : code + )};`, map: { mappings: "" } }; } |
