Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Commit

Permalink
Fix build issue where module-import code gets dropped from the bundle (
Browse files Browse the repository at this point in the history
…#987)

`backend_cpu.ts` and `backend_webgl.ts` are never included from `index.ts` even though there is
`export {WebGLTimingInfo} from './kernels/backend_webgl';`. That export is just a Typescript interface, and gets compiled away in the es5 code.
  • Loading branch information
dsmilkov authored Apr 24, 2018
1 parent 9947800 commit 3846fc0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
* =============================================================================
*/

// backend_cpu.ts and backend_webgl.ts are standalone files and should be
// explicily included here. Below, there is an export from backend_webgl, but
// that doesn't count since it's exporting a Typescript interface.
import './kernels/backend_webgl';
import './kernels/backend_cpu';

import {BrowserUtil} from './browser_util';
import * as environment from './environment';
import {Environment} from './environment';
Expand Down

0 comments on commit 3846fc0

Please sign in to comment.