Skip to content

Commit 1f7f9f4

Browse files
artdevgamehaganbmj
authored andcommitted
feat: export as umd in webpack so it can be imported using static imports (obs-websocket-community-projects#171)
* Export using commonjs-module in webpack so it can be imported using static imports * fix: switch to umd instead of commonjs-module * misc: try removing GH_TOKEN from build-types if not available
1 parent 5521364 commit 1f7f9f4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.travis/build-types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ async function getLatestComments(): Promise<any> {
8888
Authorization: `token ${process.env.GH_TOKEN}`
8989
};
9090

91+
if (!process.env.GH_TOKEN) {
92+
delete headers.Authorization;
93+
}
94+
9195
const latestReleaseResponse = await got('https://api.github.com/repos/Palakis/obs-websocket/releases/latest', {
9296
json: true,
9397
headers

webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ module.exports = {
2323
output: {
2424
path: path.join(__dirname, '/dist'),
2525
filename: '[name].js',
26-
library: 'OBSWebSocket'
26+
library: 'OBSWebSocket',
27+
libraryTarget: 'umd'
2728
},
2829
devtool: 'source-map',
2930
plugins: [

0 commit comments

Comments
 (0)