mirror of
https://github.com/mathuo/dockview
synced 2025-08-29 13:36:31 +00:00
feat: generate UMD bundle without react dependency
This commit is contained in:
parent
bd381640af
commit
ff3f0b23a8
@ -15,6 +15,10 @@ const outputDir = join(__dirname, 'dist');
|
|||||||
function outputFile(format, isMinified, withStyles, isReact) {
|
function outputFile(format, isMinified, withStyles, isReact) {
|
||||||
let filename = join(outputDir, name);
|
let filename = join(outputDir, name);
|
||||||
|
|
||||||
|
if (isReact) {
|
||||||
|
filename += '.react';
|
||||||
|
}
|
||||||
|
|
||||||
if (format !== 'umd') {
|
if (format !== 'umd') {
|
||||||
filename += `.${format}`;
|
filename += `.${format}`;
|
||||||
}
|
}
|
||||||
@ -25,10 +29,6 @@ function outputFile(format, isMinified, withStyles, isReact) {
|
|||||||
filename += '.noStyle';
|
filename += '.noStyle';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isReact) {
|
|
||||||
filename += '.corejs';
|
|
||||||
}
|
|
||||||
|
|
||||||
return `${filename}.js`;
|
return `${filename}.js`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ export default [
|
|||||||
// esm
|
// esm
|
||||||
createBundle('esm', { withStyles: true, isMinified: false, isReact: true }),
|
createBundle('esm', { withStyles: true, isMinified: false, isReact: true }),
|
||||||
createBundle('esm', { withStyles: true, isMinified: true, isReact: true }),
|
createBundle('esm', { withStyles: true, isMinified: true, isReact: true }),
|
||||||
// react extensions
|
// core bundles (no-react)
|
||||||
createBundle('umd', {
|
createBundle('umd', {
|
||||||
withStyles: true,
|
withStyles: true,
|
||||||
isMinified: false,
|
isMinified: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user