created exports in pkg json and esm browser bundle that removes nodejs dependencies

This commit is contained in:
Tom Wilson
2022-05-31 12:58:50 +00:00
committed by just_ppe
parent 6ad33a0225
commit 0dd33175c8
2 changed files with 23 additions and 1 deletions

View File

@@ -37,6 +37,20 @@ const runBuild = async () => {
console.log(e);
process.exit(1);
});
build({
entryPoints: ['./src/index.ts'],
minify: false,
bundle: true,
outfile: './bundles/esm.bundle.js',
platform: 'browser',
target: ['es2020', 'chrome58', 'firefox57', 'safari11'],
format: 'esm',
globalName: 'rsdk'
}).catch((e) => {
console.log(e);
process.exit(1);
});
};
runBuild();