1
0
mirror of https://github.com/vector-im/hydrogen-web.git synced 2025-01-10 20:17:32 +01:00
2023-01-19 09:24:44 +01:00

342 B

How to import common-js dependency using ES6 syntax


Until #6632 is fixed, such imports should be done as follows:

import * as pkg from "off-color";
// @ts-ignore 
const offColor = pkg.offColor ?? pkg.default.offColor;

This way build, dev server and unit tests should all work.