Skip to content

Commit

Permalink
feat: export chobitsu instance
Browse files Browse the repository at this point in the history
surunzi committed Oct 3, 2024
1 parent ec4b5b4 commit 0a0231c
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/target.ts
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import { embedded, rtc } from './target/config';
import connectRtc from './target/connectRtc';
import connectServer from './target/connectServer';
import connectIframe from './target/connectIframe';
import chobitsu from 'chobitsu';

if (!embedded) {
if (rtc) {
@@ -12,3 +13,7 @@ if (!embedded) {
} else {
connectIframe();
}

module.exports = {
chobitsu,
};
8 changes: 7 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,13 @@ module.exports = (env, argv) => {
target: ['web', 'es5'],
entry: {
index: './src/index.ts',
target: './src/target.ts',
target: {
import: './src/target.ts',
library: {
name: 'chii',
type: 'umd',
},
},
},
devtool: 'inline-source-map',
output: {

0 comments on commit 0a0231c

Please sign in to comment.