forked from mystiq/hydrogen-web
38c3774869
> Will be easier towards the future when adding more assets. Probably best to keep style.css for now for backwards compat though. > > *-- https://github.com/vector-im/hydrogen-web/pull/693#discussion_r853844282*
13 lines
494 B
JavaScript
13 lines
494 B
JavaScript
// Make sure the SDK can be used in a CommonJS environment.
|
|
// Usage: node scripts/sdk/test/test-sdk-in-commonjs-env.js
|
|
const hydrogenViewSdk = require('hydrogen-view-sdk');
|
|
|
|
// Test that the "exports" are available:
|
|
// Worker
|
|
require.resolve('hydrogen-view-sdk/main.js');
|
|
// Styles
|
|
require.resolve('hydrogen-view-sdk/assets/theme-element-light.css');
|
|
// Can access files in the assets/* directory
|
|
require.resolve('hydrogen-view-sdk/assets/main.js');
|
|
|
|
console.log('SDK works in CommonJS ✅');
|