feat: generate UMD bundle without react dependency

This commit is contained in:
mathuo 2023-02-07 18:03:07 +07:00
parent bd381640af
commit ff3f0b23a8
No known key found for this signature in database
GPG Key ID: C6EEDEFD6CA07281

View File

@ -15,6 +15,10 @@ const outputDir = join(__dirname, 'dist');
function outputFile(format, isMinified, withStyles, isReact) {
let filename = join(outputDir, name);
if (isReact) {
filename += '.react';
}
if (format !== 'umd') {
filename += `.${format}`;
}
@ -25,10 +29,6 @@ function outputFile(format, isMinified, withStyles, isReact) {
filename += '.noStyle';
}
if (!isReact) {
filename += '.corejs';
}
return `${filename}.js`;
}
@ -132,7 +132,7 @@ export default [
// esm
createBundle('esm', { withStyles: true, isMinified: false, isReact: true }),
createBundle('esm', { withStyles: true, isMinified: true, isReact: true }),
// react extensions
// core bundles (no-react)
createBundle('umd', {
withStyles: true,
isMinified: false,