@qubit-ltd/rollup-builder 1.8.6 → 1.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rollup-builder.cjs +29 -29
- package/dist/rollup-builder.cjs.map +1 -1
- package/dist/rollup-builder.min.cjs.map +1 -1
- package/dist/rollup-builder.min.mjs.map +1 -1
- package/dist/rollup-builder.mjs +29 -29
- package/dist/rollup-builder.mjs.map +1 -1
- package/doc/api/global.html +1 -1
- package/doc/api/index.html +1 -1
- package/doc/rollup-builder.min.visualization.html +1 -1
- package/doc/rollup-builder.visualization.html +1 -1
- package/package.json +5 -5
package/dist/rollup-builder.mjs
CHANGED
|
@@ -11,8 +11,8 @@ import terser from '@rollup/plugin-terser';
|
|
|
11
11
|
import analyzer from 'rollup-plugin-analyzer';
|
|
12
12
|
import { visualizer } from 'rollup-plugin-visualizer';
|
|
13
13
|
|
|
14
|
-
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done:
|
|
15
|
-
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) :
|
|
14
|
+
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
15
|
+
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : undefined; } }
|
|
16
16
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -46,7 +46,7 @@ function getRollupExternal(importMetaUrl, options) {
|
|
|
46
46
|
}
|
|
47
47
|
var peerPattern = peers ? new RegExp("^(".concat(peers.join('|'), ")($|/)")) : null;
|
|
48
48
|
// gets the additional external packages from the user passed options
|
|
49
|
-
var additions = (_options$externals = options.externals) !== null && _options$externals !==
|
|
49
|
+
var additions = (_options$externals = options.externals) !== null && _options$externals !== undefined ? _options$externals : [];
|
|
50
50
|
// save some configuration to the options object
|
|
51
51
|
options.peers = peers;
|
|
52
52
|
options.peerPattern = peerPattern;
|
|
@@ -101,7 +101,7 @@ function getRollupOutput(format, libraryName, options) {
|
|
|
101
101
|
var _options$exports, _options$nodeEnv, _options$minify, _options$filenamePref, _options$outputDir, _options$sourcemap;
|
|
102
102
|
var filenameExt = '';
|
|
103
103
|
var footer = '';
|
|
104
|
-
var exports = (_options$exports = options.exports) !== null && _options$exports !==
|
|
104
|
+
var exports = (_options$exports = options.exports) !== null && _options$exports !== undefined ? _options$exports : 'auto';
|
|
105
105
|
switch (format) {
|
|
106
106
|
case 'cjs': // drop down
|
|
107
107
|
case 'umd':
|
|
@@ -181,16 +181,16 @@ function getRollupOutput(format, libraryName, options) {
|
|
|
181
181
|
default:
|
|
182
182
|
throw new Error("Unsupported library format: ".concat(format));
|
|
183
183
|
}
|
|
184
|
-
var nodeEnv = (_options$nodeEnv = options.nodeEnv) !== null && _options$nodeEnv !==
|
|
185
|
-
var minify = (_options$minify = options.minify) !== null && _options$minify !==
|
|
184
|
+
var nodeEnv = (_options$nodeEnv = options.nodeEnv) !== null && _options$nodeEnv !== undefined ? _options$nodeEnv : process.env.NODE_ENV;
|
|
185
|
+
var minify = (_options$minify = options.minify) !== null && _options$minify !== undefined ? _options$minify : nodeEnv === 'production';
|
|
186
186
|
var camelCaseToDashCase = function camelCaseToDashCase(s) {
|
|
187
187
|
return s.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
188
188
|
};
|
|
189
|
-
var filenamePrefix = (_options$filenamePref = options.filenamePrefix) !== null && _options$filenamePref !==
|
|
189
|
+
var filenamePrefix = (_options$filenamePref = options.filenamePrefix) !== null && _options$filenamePref !== undefined ? _options$filenamePref : camelCaseToDashCase(libraryName);
|
|
190
190
|
var filenameBase = "".concat(filenamePrefix).concat(minify ? '.min' : '');
|
|
191
191
|
var filename = "".concat(filenameBase).concat(filenameExt);
|
|
192
|
-
var outputDir = (_options$outputDir = options.outputDir) !== null && _options$outputDir !==
|
|
193
|
-
var sourcemap = (_options$sourcemap = options.sourcemap) !== null && _options$sourcemap !==
|
|
192
|
+
var outputDir = (_options$outputDir = options.outputDir) !== null && _options$outputDir !== undefined ? _options$outputDir : 'dist';
|
|
193
|
+
var sourcemap = (_options$sourcemap = options.sourcemap) !== null && _options$sourcemap !== undefined ? _options$sourcemap : true;
|
|
194
194
|
// save some configuration to the options object
|
|
195
195
|
options.format = format;
|
|
196
196
|
options.name = libraryName;
|
|
@@ -240,11 +240,11 @@ function getRollupOutput(format, libraryName, options) {
|
|
|
240
240
|
*/
|
|
241
241
|
function configAliasPlugin(format, importMetaUrl, options, plugins) {
|
|
242
242
|
var _options$useAliasPlug;
|
|
243
|
-
if ((_options$useAliasPlug = options.useAliasPlugin) !== null && _options$useAliasPlug !==
|
|
243
|
+
if ((_options$useAliasPlug = options.useAliasPlugin) !== null && _options$useAliasPlug !== undefined ? _options$useAliasPlug : true) {
|
|
244
244
|
var _options$aliasPluginO;
|
|
245
245
|
// The @rollup/plugin-alias enables us to use absolute import paths for
|
|
246
246
|
// "src" (or any other path you want to configure).
|
|
247
|
-
var pluginOptions = (_options$aliasPluginO = options.aliasPluginOptions) !== null && _options$aliasPluginO !==
|
|
247
|
+
var pluginOptions = (_options$aliasPluginO = options.aliasPluginOptions) !== null && _options$aliasPluginO !== undefined ? _options$aliasPluginO : {
|
|
248
248
|
entries: {
|
|
249
249
|
'src': fileURLToPath(new URL('src', importMetaUrl))
|
|
250
250
|
}
|
|
@@ -287,11 +287,11 @@ function configAliasPlugin(format, importMetaUrl, options, plugins) {
|
|
|
287
287
|
*/
|
|
288
288
|
function configNodeResolvePlugin(format, importMetaUrl, options, plugins) {
|
|
289
289
|
var _options$useNodeResol;
|
|
290
|
-
if ((_options$useNodeResol = options.useNodeResolvePlugin) !== null && _options$useNodeResol !==
|
|
290
|
+
if ((_options$useNodeResol = options.useNodeResolvePlugin) !== null && _options$useNodeResol !== undefined ? _options$useNodeResol : true) {
|
|
291
291
|
var _options$nodeResolveP;
|
|
292
292
|
// The @rollup/plugin-node-resolve allows Rollup to resolve external
|
|
293
293
|
// modules from node_modules:
|
|
294
|
-
var pluginOptions = (_options$nodeResolveP = options.nodeResolvePluginOptions) !== null && _options$nodeResolveP !==
|
|
294
|
+
var pluginOptions = (_options$nodeResolveP = options.nodeResolvePluginOptions) !== null && _options$nodeResolveP !== undefined ? _options$nodeResolveP : {};
|
|
295
295
|
if (options.debug === true) {
|
|
296
296
|
console.debug('[DEBUG] The @rollup/plugin-node-resolve plugin options are:');
|
|
297
297
|
console.dir(pluginOptions, {
|
|
@@ -330,7 +330,7 @@ function configNodeResolvePlugin(format, importMetaUrl, options, plugins) {
|
|
|
330
330
|
*/
|
|
331
331
|
function configCommonJsPlugin(format, importMetaUrl, options, plugins) {
|
|
332
332
|
var _options$useCommonjsP;
|
|
333
|
-
if ((_options$useCommonjsP = options.useCommonjsPlugin) !== null && _options$useCommonjsP !==
|
|
333
|
+
if ((_options$useCommonjsP = options.useCommonjsPlugin) !== null && _options$useCommonjsP !== undefined ? _options$useCommonjsP : true) {
|
|
334
334
|
var _options$commonjsPlug;
|
|
335
335
|
// The @rollup/plugin-commonjs plugin converts 3rd-party CommonJS modules
|
|
336
336
|
// into ES6 code, so that they can be included in our Rollup bundle.
|
|
@@ -338,7 +338,7 @@ function configCommonJsPlugin(format, importMetaUrl, options, plugins) {
|
|
|
338
338
|
// same Rollup configuration, it's important to note that
|
|
339
339
|
// @rollup/plugin-commonjs must be placed before this plugin in the
|
|
340
340
|
// plugins array for the two to work together properly.
|
|
341
|
-
var pluginOptions = (_options$commonjsPlug = options.commonjsPluginOptions) !== null && _options$commonjsPlug !==
|
|
341
|
+
var pluginOptions = (_options$commonjsPlug = options.commonjsPluginOptions) !== null && _options$commonjsPlug !== undefined ? _options$commonjsPlug : {
|
|
342
342
|
include: ['node_modules/**']
|
|
343
343
|
};
|
|
344
344
|
if (options.debug === true) {
|
|
@@ -379,9 +379,9 @@ function configCommonJsPlugin(format, importMetaUrl, options, plugins) {
|
|
|
379
379
|
*/
|
|
380
380
|
function configBabelPlugin(format, importMetaUrl, options, plugins) {
|
|
381
381
|
var _options$useBabelPlug;
|
|
382
|
-
if ((_options$useBabelPlug = options.useBabelPlugin) !== null && _options$useBabelPlug !==
|
|
382
|
+
if ((_options$useBabelPlug = options.useBabelPlugin) !== null && _options$useBabelPlug !== undefined ? _options$useBabelPlug : true) {
|
|
383
383
|
var _options$babelPluginO;
|
|
384
|
-
var pluginOptions = (_options$babelPluginO = options.babelPluginOptions) !== null && _options$babelPluginO !==
|
|
384
|
+
var pluginOptions = (_options$babelPluginO = options.babelPluginOptions) !== null && _options$babelPluginO !== undefined ? _options$babelPluginO : {
|
|
385
385
|
babelHelpers: 'runtime',
|
|
386
386
|
exclude: ['node_modules/**'],
|
|
387
387
|
presets: [
|
|
@@ -430,12 +430,12 @@ function configBabelPlugin(format, importMetaUrl, options, plugins) {
|
|
|
430
430
|
*/
|
|
431
431
|
function configTerserPlugin(format, importMetaUrl, options, plugins) {
|
|
432
432
|
var _options$nodeEnv, _options$minify;
|
|
433
|
-
var nodeEnv = (_options$nodeEnv = options.nodeEnv) !== null && _options$nodeEnv !==
|
|
434
|
-
var minify = (_options$minify = options.minify) !== null && _options$minify !==
|
|
433
|
+
var nodeEnv = (_options$nodeEnv = options.nodeEnv) !== null && _options$nodeEnv !== undefined ? _options$nodeEnv : process.env.NODE_ENV;
|
|
434
|
+
var minify = (_options$minify = options.minify) !== null && _options$minify !== undefined ? _options$minify : nodeEnv === 'production';
|
|
435
435
|
if (minify) {
|
|
436
436
|
var _options$terserPlugin;
|
|
437
437
|
// The @rollup/plugin-terser uses terser under the hood to minify the code.
|
|
438
|
-
var pluginOptions = (_options$terserPlugin = options.terserPluginOptions) !== null && _options$terserPlugin !==
|
|
438
|
+
var pluginOptions = (_options$terserPlugin = options.terserPluginOptions) !== null && _options$terserPlugin !== undefined ? _options$terserPlugin : {
|
|
439
439
|
output: {
|
|
440
440
|
comments: false // default to remove all comments
|
|
441
441
|
},
|
|
@@ -481,11 +481,11 @@ function configTerserPlugin(format, importMetaUrl, options, plugins) {
|
|
|
481
481
|
*/
|
|
482
482
|
function configAnalyzerPlugin(format, importMetaUrl, options, plugins) {
|
|
483
483
|
var _options$useAnalyzerP;
|
|
484
|
-
if ((_options$useAnalyzerP = options.useAnalyzerPlugin) !== null && _options$useAnalyzerP !==
|
|
484
|
+
if ((_options$useAnalyzerP = options.useAnalyzerPlugin) !== null && _options$useAnalyzerP !== undefined ? _options$useAnalyzerP : true) {
|
|
485
485
|
var _options$analyzerPlug;
|
|
486
486
|
// The rollup-plugin-analyzer will print out some useful info about our
|
|
487
487
|
// generated bundle upon successful builds.
|
|
488
|
-
var pluginOptions = (_options$analyzerPlug = options.analyzerPluginOptions) !== null && _options$analyzerPlug !==
|
|
488
|
+
var pluginOptions = (_options$analyzerPlug = options.analyzerPluginOptions) !== null && _options$analyzerPlug !== undefined ? _options$analyzerPlug : {
|
|
489
489
|
hideDeps: true,
|
|
490
490
|
limit: 0,
|
|
491
491
|
summaryOnly: true
|
|
@@ -531,11 +531,11 @@ function configAnalyzerPlugin(format, importMetaUrl, options, plugins) {
|
|
|
531
531
|
*/
|
|
532
532
|
function configVisualizerPlugin(format, importMetaUrl, options, plugins) {
|
|
533
533
|
var _options$useVisualize;
|
|
534
|
-
if ((_options$useVisualize = options.useVisualizerPlugin) !== null && _options$useVisualize !==
|
|
534
|
+
if ((_options$useVisualize = options.useVisualizerPlugin) !== null && _options$useVisualize !== undefined ? _options$useVisualize : true) {
|
|
535
535
|
var _options$visualizerPl;
|
|
536
536
|
// The rollup-plugin-visualizer will visualize and analyze your Rollup
|
|
537
537
|
// bundle to see which modules are taking up space.
|
|
538
|
-
var pluginOptions = (_options$visualizerPl = options.visualizerPluginOptions) !== null && _options$visualizerPl !==
|
|
538
|
+
var pluginOptions = (_options$visualizerPl = options.visualizerPluginOptions) !== null && _options$visualizerPl !== undefined ? _options$visualizerPl : {
|
|
539
539
|
filename: "./doc/".concat(options.filenameBase, ".visualization.html"),
|
|
540
540
|
gzipSize: true,
|
|
541
541
|
brotliSize: true
|
|
@@ -605,9 +605,9 @@ function getRollupOnWarn() {
|
|
|
605
605
|
}
|
|
606
606
|
|
|
607
607
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
608
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
609
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done:
|
|
610
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) :
|
|
608
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
609
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
610
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined; } }
|
|
611
611
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
612
612
|
|
|
613
613
|
/**
|
|
@@ -736,9 +736,9 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
736
736
|
function rollupBuilder(libraryName, importMetaUrl) {
|
|
737
737
|
var _options$formats, _options$input;
|
|
738
738
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
739
|
-
var formats = (_options$formats = options.formats) !== null && _options$formats !==
|
|
739
|
+
var formats = (_options$formats = options.formats) !== null && _options$formats !== undefined ? _options$formats : ['cjs', 'esm'];
|
|
740
740
|
var result = [];
|
|
741
|
-
var input = (_options$input = options.input) !== null && _options$input !==
|
|
741
|
+
var input = (_options$input = options.input) !== null && _options$input !== undefined ? _options$input : 'src/index.js';
|
|
742
742
|
var _iterator = _createForOfIteratorHelper(formats),
|
|
743
743
|
_step;
|
|
744
744
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup-builder.mjs","sources":["../src/get-rollup-external.mjs","../src/get-rollup-output.mjs","../src/plugins/config-alias-plugin.mjs","../src/plugins/config-node-resolve-plugin.mjs","../src/plugins/config-common-js-plugin.mjs","../src/plugins/config-babel-plugin.mjs","../src/plugins/config-terser-plugin.mjs","../src/plugins/config-analyzer-plugin.mjs","../src/plugins/config-visualizer-plugin.mjs","../src/get-rollup-plugins.mjs","../src/get-rollup-on-warn.mjs","../src/rollup-builder.mjs","../src/index.mjs"],"sourcesContent":["////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport { createRequire } from 'node:module';\n\n/**\n * Gets Rollup `external` configuration.\n *\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @returns {function}\n * The predicate used as the Rollup `external` configuration for the library.\n * @author Haixing Hu\n */\nfunction getRollupExternal(importMetaUrl, options) {\n if (!importMetaUrl) {\n throw new Error('importMetaUrl is required');\n }\n if (!options) {\n throw new Error('options is required');\n }\n // gets all peerDependencies packages from 'package.json' of the caller module\n const require = createRequire(importMetaUrl);\n const pkg = require('./package.json');\n const peers = [...Object.keys(pkg.peerDependencies || {})];\n if (!Array.isArray(peers)) {\n throw new Error('peerDependencies should be an array');\n }\n if (peers.length === 0) {\n return [];\n }\n const peerPattern = (peers ? new RegExp(`^(${peers.join('|')})($|/)`) : null);\n // gets the additional external packages from the user passed options\n const additions = options.externals ?? [];\n // save some configuration to the options object\n options.peers = peers;\n options.peerPattern = peerPattern;\n return (id) => {\n if (peerPattern && peerPattern.test(id)) {\n return true;\n }\n for (const pattern of additions) {\n if ((pattern instanceof RegExp) && pattern.test(id)) {\n return true;\n }\n if (((typeof pattern === 'string') || (pattern instanceof String)) && (pattern === id)) {\n return true;\n }\n }\n return false;\n };\n}\n\nexport default getRollupExternal;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Gets the Rollup `output` configuration.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} libraryName\n * The name of the library.\n * @param {object} options\n * The additional options for building the library.\n * @returns {object}\n * The Rollup output configuration for the library.\n * @author Haixing Hu\n */\nfunction getRollupOutput(format, libraryName, options) {\n let filenameExt = '';\n let footer = '';\n let exports = options.exports ?? 'auto';\n switch (format) {\n case 'cjs': // drop down\n case 'umd': // drop down\n filenameExt = (format === 'cjs' ? '.cjs' : `.${format}.js`);\n // The following workaround is to solve the following issue: If an ESM\n // module has both default export and named exports, the rollup cannot\n // handle it correctly. For example, the following is a source ESM module:\n // ```js\n // export { Foo, Bar };\n // export default Foo;\n // ```\n // The rollup will translate it into the following codes:\n // ```js\n // exports.Foo = Foo;\n // exports.Bar = Bar;\n // exports.default = Foo;\n // ```\n // However, a common-js consumer will use the module as follows:\n // ```js\n // const Foo = require('my-module');\n // ```\n // which will cause an error. The correct usage should be\n // ```js\n // const Foo = require('my-module').default\n // ```\n // But unfortunately, the rollup will translate the ESM default import as\n // follows:\n // ```js\n // import Foo from 'my-module';\n // ```\n // will be translated by rollup to\n // ```js\n // const Foo = require('my-module');\n // ```\n // Note that the above translation has no `.default` suffix, which will\n // cause an error.\n //\n // The workaround is copied from the source code of the official rollup\n // plugins:\n // https://github.com/rollup/plugins/blob/master/shared/rollup.config.mjs\n //\n // It adds a simple footer statements to each `CJS` format bundle:\n // ```js\n // module.exports = Object.assign(exports.default, exports);\n // ```\n //\n // See:\n // [1] https://rollupjs.org/configuration-options/#output-exports\n // [2] https://github.com/rollup/rollup/issues/1961\n // [3] https://stackoverflow.com/questions/58246998/mixing-default-and-named-exports-with-rollup\n // [4] https://github.com/avisek/rollup-patch-seamless-default-export\n // [5] https://github.com/rollup/plugins/blob/master/shared/rollup.config.mjs\n //\n if (exports === 'mixed') {\n exports = 'named';\n footer = 'module.exports = Object.assign(exports.default, exports);';\n }\n break;\n case 'amd': // drop down\n case 'iife':\n filenameExt = `.${format}.js`;\n if (exports === 'mixed') {\n exports = 'auto';\n }\n break;\n case 'es': // drop down\n case 'esm': // drop down\n case 'module':\n format = 'es';\n filenameExt = '.mjs';\n // fix the exports, because the ESM format does not support the 'mixed' exports mode\n if (exports === 'mixed') {\n exports = 'auto';\n }\n break;\n default:\n throw new Error(`Unsupported library format: ${format}`);\n }\n const nodeEnv = options.nodeEnv ?? process.env.NODE_ENV;\n const minify = options.minify ?? (nodeEnv === 'production');\n const camelCaseToDashCase = (s) => s.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n const filenamePrefix = options.filenamePrefix ?? camelCaseToDashCase(libraryName);\n const filenameBase = `${filenamePrefix}${minify ? '.min' : ''}`;\n const filename = `${filenameBase}${filenameExt}`;\n const outputDir = options.outputDir ?? 'dist';\n const sourcemap = options.sourcemap ?? true;\n // save some configuration to the options object\n options.format = format;\n options.name = libraryName;\n options.minify = minify;\n options.filenamePrefix = filenamePrefix;\n options.filenameBase = filenameBase;\n options.filenameExt = filenameExt;\n options.filename = filename;\n options.exports = exports;\n options.sourcemap = sourcemap;\n options.outputDir = outputDir;\n return {\n name: libraryName,\n file: `${outputDir}/${filename}`,\n format,\n exports,\n footer,\n sourcemap,\n compact: minify,\n };\n}\n\nexport default getRollupOutput;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport { fileURLToPath } from 'node:url';\nimport alias from '@rollup/plugin-alias';\n\n/**\n * Configures the `@rollup/plugin-alias` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array<Object>} plugins\n * The Rollup plugins array.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-alias\n */\nfunction configAliasPlugin(format, importMetaUrl, options, plugins) {\n if (options.useAliasPlugin ?? true) {\n // The @rollup/plugin-alias enables us to use absolute import paths for\n // \"src\" (or any other path you want to configure).\n const pluginOptions = options.aliasPluginOptions ?? {\n entries: {\n 'src': fileURLToPath(new URL('src', importMetaUrl)),\n },\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-alias plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(alias(pluginOptions));\n }\n return plugins;\n}\n\nexport default configAliasPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport nodeResolve from '@rollup/plugin-node-resolve';\n\n/**\n * Configures the `@rollup/plugin-node-resolve` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array<Object>} plugins\n * The Rollup plugins array.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-node-resolve\n */\nfunction configNodeResolvePlugin(format, importMetaUrl, options, plugins) {\n if (options.useNodeResolvePlugin ?? true) {\n // The @rollup/plugin-node-resolve allows Rollup to resolve external\n // modules from node_modules:\n const pluginOptions = options.nodeResolvePluginOptions ?? {};\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-node-resolve plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(nodeResolve(pluginOptions));\n }\n return plugins;\n}\n\nexport default configNodeResolvePlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport commonjs from '@rollup/plugin-commonjs';\n\n/**\n * Configures the `@rollup/plugin-commonjs` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array<Object>} plugins\n * The Rollup plugins array.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-commonjs\n */\nfunction configCommonJsPlugin(format, importMetaUrl, options, plugins) {\n if (options.useCommonjsPlugin ?? true) {\n // The @rollup/plugin-commonjs plugin converts 3rd-party CommonJS modules\n // into ES6 code, so that they can be included in our Rollup bundle.\n // When using @rollup/plugin-babel with @rollup/plugin-commonjs in the\n // same Rollup configuration, it's important to note that\n // @rollup/plugin-commonjs must be placed before this plugin in the\n // plugins array for the two to work together properly.\n const pluginOptions = options.commonjsPluginOptions ?? {\n include: ['node_modules/**'],\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-commonjs plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(commonjs(pluginOptions));\n }\n return plugins;\n}\n\nexport default configCommonJsPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport babel from '@rollup/plugin-babel';\n\n/**\n * Configures the `@rollup/plugin-babel` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array} plugins\n * The array of Rollup plugins.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-babel\n */\nfunction configBabelPlugin(format, importMetaUrl, options, plugins) {\n if (options.useBabelPlugin ?? true) {\n const pluginOptions = options.babelPluginOptions ?? {\n babelHelpers: 'runtime',\n exclude: ['node_modules/**'],\n presets: [\n // The @babel/preset-env preset enables Babel to transpile ES6+ code\n // and the rollup requires that Babel keeps ES6 module syntax intact.\n ['@babel/preset-env', { modules: false }],\n ],\n plugins: [\n '@babel/plugin-transform-runtime',\n ],\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-babel plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(babel(pluginOptions));\n }\n return plugins;\n}\n\nexport default configBabelPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport terser from '@rollup/plugin-terser';\n\n/**\n * Configures the `@rollup/plugin-terser` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array} plugins\n * The array of Rollup plugins.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-terser\n */\nfunction configTerserPlugin(format, importMetaUrl, options, plugins) {\n const nodeEnv = options.nodeEnv ?? process.env.NODE_ENV;\n const minify = options.minify ?? (nodeEnv === 'production');\n if (minify) {\n // The @rollup/plugin-terser uses terser under the hood to minify the code.\n const pluginOptions = options.terserPluginOptions ?? {\n output: {\n comments: false, // default to remove all comments\n },\n keep_classnames: true, // keep the class names\n keep_fnames: true, // keep the function names\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-terser plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(terser(pluginOptions));\n }\n return plugins;\n}\n\nexport default configTerserPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport analyzer from 'rollup-plugin-analyzer';\n\n/**\n * Configures the `rollup-plugin-analyzer` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array} plugins\n * The array of Rollup plugins.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/rollup-plugin-analyzer\n */\nfunction configAnalyzerPlugin(format, importMetaUrl, options, plugins) {\n if (options.useAnalyzerPlugin ?? true) {\n // The rollup-plugin-analyzer will print out some useful info about our\n // generated bundle upon successful builds.\n const pluginOptions = options.analyzerPluginOptions ?? {\n hideDeps: true,\n limit: 0,\n summaryOnly: true,\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The rollup-plugin-analyzer plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(analyzer(pluginOptions));\n }\n return plugins;\n}\n\nexport default configAnalyzerPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport { visualizer } from 'rollup-plugin-visualizer';\n\n/**\n * Configures the `rollup-plugin-visualizer` plugin.\n *\n * The `rollup-plugin-visualizer` will visualize and analyze your Rollup\n * bundle to see which modules are taking up space.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array} plugins\n * The array of Rollup plugins.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/rollup-plugin-visualizer\n */\nfunction configVisualizerPlugin(format, importMetaUrl, options, plugins) {\n if (options.useVisualizerPlugin ?? true) {\n // The rollup-plugin-visualizer will visualize and analyze your Rollup\n // bundle to see which modules are taking up space.\n const pluginOptions = options.visualizerPluginOptions ?? {\n filename: `./doc/${options.filenameBase}.visualization.html`,\n gzipSize: true,\n brotliSize: true,\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The rollup-plugin-visualizer plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(visualizer(pluginOptions));\n }\n return plugins;\n}\n\nexport default configVisualizerPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport json from '@rollup/plugin-json';\nimport configAliasPlugin from './plugins/config-alias-plugin.mjs';\nimport configNodeResolvePlugin from './plugins/config-node-resolve-plugin.mjs';\nimport configCommonJsPlugin from './plugins/config-common-js-plugin.mjs';\nimport configBabelPlugin from './plugins/config-babel-plugin.mjs';\nimport configTerserPlugin from './plugins/config-terser-plugin.mjs';\nimport configAnalyzerPlugin from './plugins/config-analyzer-plugin.mjs';\nimport configVisualizerPlugin from './plugins/config-visualizer-plugin.mjs';\n\n/**\n * Gets Rollup `plugins` configuration.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @returns {Array<Object>}\n * The Rollup plugins array.\n * @author Haixing Hu\n */\nfunction getRollupPlugins(format, importMetaUrl, options) {\n const plugins = [];\n plugins.push(json());\n configAliasPlugin(format, importMetaUrl, options, plugins);\n configNodeResolvePlugin(format, importMetaUrl, options, plugins);\n configCommonJsPlugin(format, importMetaUrl, options, plugins);\n configBabelPlugin(format, importMetaUrl, options, plugins);\n configTerserPlugin(format, importMetaUrl, options, plugins);\n configAnalyzerPlugin(format, importMetaUrl, options, plugins);\n configVisualizerPlugin(format, importMetaUrl, options, plugins);\n // The user can specify additional plugins.\n if (options.plugins) {\n plugins.push(...options.plugins);\n }\n return plugins;\n}\n\nexport default getRollupPlugins;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2024.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\n\nfunction getRollupOnWarn() {\n return function onWarn(warning, warn) {\n // skip certain warnings\n if (warning.code === 'INVALID_ANNOTATION'\n && warning.message.includes('#__PURE__')\n && warning.message.includes('terser')) {\n return;\n }\n if (warning.code === 'CIRCULAR_DEPENDENCY'\n && warning.message.includes('node_modules')) {\n return;\n }\n // Use default for everything else\n warn(warning);\n };\n}\n\nexport default getRollupOnWarn;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport getRollupExternal from './get-rollup-external.mjs';\nimport getRollupOutput from './get-rollup-output.mjs';\nimport getRollupPlugins from './get-rollup-plugins.mjs';\nimport getRollupOnWarn from './get-rollup-on-warn.mjs';\n\n/**\n * Builds the Rollup configuration for a library.\n *\n * The function could be provided with an additional options for building the\n * library. It can have the following fields:\n *\n * - `debug: boolean`: whether to print the debug information. If this field is\n * not specified, the default value is `false`.\n * - `formats: [string]`: the array of formats of the library. It can be an\n * array of the following values:\n * - `'cjs'`: the CommonJS format.\n * - `'umd'`: the UMD format.\n * - `'esm'`: the ES module format.\n *\n * If this field is not specified, the default value is `['cjs', 'esm']`.\n * - `exports: string`: the export mode to use. It can be one of the following\n * values:\n * - `'auto'`: automatically guesses your intentions based on what the input\n * module exports.\n * - `'default'`: if you are only exporting one thing using `export default ...`;\n * note that this can cause issues when generating CommonJS output that is\n * meant to be interchangeable with ESM output.\n * - `'named'`: if you are using named exports.\n * - `'none'`: if you are not exporting anything (e.g. you are building an\n * app, not a library)\n * - `'mixed'`: if you are using named exports mixed with a default export.\n * Note that this is not a standard exports mode officially supported by\n * the `rollup`, instead, it is an additional mode add by this library.\n *\n * See [output.exports](https://rollupjs.org/configuration-options/#output-exports)\n * for more details. If this field is not specified, the default value is\n * `'auto'`.\n * - `nodeEnv: string`: the value of the `NODE_ENV` environment variable. If\n * this field is not specified, the default value is `process.env.NODE_ENV`.\n * - `minify: boolean`: whether to minify the code. If this field is not\n * specified, and the `nodeEnv` is `production`, the default value is `true`;\n * otherwise the default value is `false`.\n * - `sourcemap: boolean`: whether to generate the source map. If this field is\n * not specified, the default value is `true`.\n * - `input: string`: the input file of the library. If this field is not\n * specified, the default value is `src/index.js`.\n * - `outputDir: string`: the output directory of the library. If this field is\n * not specified, the default value is `dist`.\n * - `filenamePrefix: string`: the prefix of the output filename. If this field\n * is not specified, the default value is the dash case of the library name.\n * For example, if the library name is `MyLibrary`, the default value of this\n * field is `my-library`.\n * - `externals: [string]`: the array of additional external packages, each can\n * be specified with either a string or a regular expression. If this field is\n * not specified, the default value is an empty array.\n * - `useAliasPlugin: boolean`: whether to use the `@rollup/plugin-alias` plugin.\n * If this field is not specified, the default value is `true`.\n * - `aliasPluginOptions: object`: the options for the `@rollup/plugin-alias`\n * plugin. If this field is not specified, the default value is:\n * ```js\n * {\n * entries: {\n * 'src': fileURLToPath(new URL('src', importMetaUrl)),\n * },\n * }\n * ```\n * - `useNodeResolvePlugin: boolean`: whether to use the `@rollup/plugin-node-resolve`\n * plugin. If this field is not specified, the default value is `true`.\n * - `nodeResolvePluginOptions: object`: the options for the `@rollup/plugin-node-resolve`\n * plugin. If this field is not specified, the default value is: `{}`.\n * - `useCommonjsPlugin: boolean`: whether to use the `@rollup/plugin-commonjs`\n * plugin. If this field is not specified, the default value is `true`.\n * - `commonjsPluginOptions: object`: the options for the `@rollup/plugin-commonjs`\n * plugin. If this field is not specified, the default value is:\n * ```js\n * {\n * include: ['node_modules/**'],\n * }\n * ```\n * - `useBabelPlugin: boolean`: whether to use the `@rollup/plugin-babel` plugin.\n * If this field is not specified, the default value is `true`.\n * - `babelPluginOptions: object`: the options for the `@rollup/plugin-babel`\n * plugin. If this field is not specified, the default value is:\n * ```js\n * {\n * babelHelpers: 'runtime',\n * exclude: ['node_modules/**'],\n * presets: [\n * '@babel/preset-env',\n * ],\n * plugins: [\n * '@babel/plugin-transform-runtime',\n * ],\n * }\n * ```\n * Note that when using the `@rollup/plugin-babel` plugin, you can also specify\n * the configuration of Babel in the standard Babel configuration files,\n * such as `babel.config.js`, `.babelrc`, etc.\n * - `terserOptions: object`: the options for the `@rollup/plugin-terser` plugin.\n * If this field is not specified, the default value is: `{}`. Whether to use\n * the `@rollup/plugin-terser` plugin depends on the `minify` field of the\n * options or the `NODE_ENV` environment variable.\n * - `useAnalyzerPlugin: boolean`: whether to use the `rollup-plugin-analyzer`\n * plugin. If this field is not specified, the default value is `true`.\n * - `analyzerOptions: object`: the options for the `rollup-plugin-analyzer`\n * plugin. If this field is not specified, the default value is:\n * ```js\n * {\n * hideDeps: true,\n * limit: 0,\n * summaryOnly: true,\n * }\n * ```\n * - `plugins: [object]`: the array of configuration of additional Rollup\n * plugins. If this field is not specified, the default value is an empty\n * array.\n *\n * @param {string} libraryName\n * The name of the library, which will be used as the name of the global\n * variable in the UMD format. It should in the camel case.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module. It **MUST** be passed\n * with the `import.meta.url` of the caller module.\n * @param {object} options\n * The additional options for building the library, as described above.\n * @returns {Array<object>}\n * the array of Rollup configurations for the library.\n */\nfunction rollupBuilder(libraryName, importMetaUrl, options = {}) {\n const formats = options.formats ?? ['cjs', 'esm'];\n const result = [];\n const input = options.input ?? 'src/index.js';\n for (const format of formats) {\n const clonedOptions = { ...options };\n const output = getRollupOutput(format, libraryName, clonedOptions);\n const external = getRollupExternal(importMetaUrl, clonedOptions);\n const plugins = getRollupPlugins(format, importMetaUrl, clonedOptions);\n const onwarn = getRollupOnWarn();\n const config = { input, output, external, plugins, onwarn };\n result.push(config);\n if (options.debug === true) {\n console.debug(`[DEBUG] The options for the format ${format} is:`);\n console.dir(clonedOptions, { depth: null });\n }\n }\n if (options.debug === true) {\n console.debug('[DEBUG] The generated rollup configurations are:');\n console.dir(result, { depth: null });\n }\n return result;\n}\n\nexport default rollupBuilder;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport rollupBuilder from './rollup-builder.mjs';\n\nexport default rollupBuilder;\n"],"names":["getRollupExternal","importMetaUrl","options","_options$externals","Error","require","createRequire","pkg","peers","_toConsumableArray","Object","keys","peerDependencies","Array","isArray","length","peerPattern","RegExp","concat","join","additions","externals","id","test","_iterator","_createForOfIteratorHelper","_step","s","n","done","pattern","value","String","err","e","f","getRollupOutput","format","libraryName","_options$exports","_options$nodeEnv","_options$minify","_options$filenamePref","_options$outputDir","_options$sourcemap","filenameExt","footer","exports","nodeEnv","process","env","NODE_ENV","minify","camelCaseToDashCase","replace","toLowerCase","filenamePrefix","filenameBase","filename","outputDir","sourcemap","name","file","compact","configAliasPlugin","plugins","_options$useAliasPlug","useAliasPlugin","_options$aliasPluginO","pluginOptions","aliasPluginOptions","entries","fileURLToPath","URL","debug","console","dir","depth","push","alias","configNodeResolvePlugin","_options$useNodeResol","useNodeResolvePlugin","_options$nodeResolveP","nodeResolvePluginOptions","nodeResolve","configCommonJsPlugin","_options$useCommonjsP","useCommonjsPlugin","_options$commonjsPlug","commonjsPluginOptions","include","commonjs","configBabelPlugin","_options$useBabelPlug","useBabelPlugin","_options$babelPluginO","babelPluginOptions","babelHelpers","exclude","presets","modules","babel","configTerserPlugin","_options$terserPlugin","terserPluginOptions","output","comments","keep_classnames","keep_fnames","terser","configAnalyzerPlugin","_options$useAnalyzerP","useAnalyzerPlugin","_options$analyzerPlug","analyzerPluginOptions","hideDeps","limit","summaryOnly","analyzer","configVisualizerPlugin","_options$useVisualize","useVisualizerPlugin","_options$visualizerPl","visualizerPluginOptions","gzipSize","brotliSize","visualizer","getRollupPlugins","json","apply","getRollupOnWarn","onWarn","warning","warn","code","message","includes","rollupBuilder","_options$formats","_options$input","arguments","undefined","formats","result","input","clonedOptions","_objectSpread","external","onwarn","config"],"mappings":";;;;;;;;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiBA,CAACC,aAAa,EAAEC,OAAO,EAAE;AAAA,EAAA,IAAAC,kBAAA;EACjD,IAAI,CAACF,aAAa,EAAE;AAClB,IAAA,MAAM,IAAIG,KAAK,CAAC,2BAA2B,C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O,CAACC,QAAQ,CAAC,WAAW,CAAC,IACrCJ,OAAO,CAACG,OAAO,CAACC,QAAQ,CAAC,QAAQ,CAAC,EAAE;AACzC,MAAA;AACF;AACA,IAAA,IAAIJ,OAAO,CAACE,IAAI,KAAK,qBAAqB,IACnCF,OAAO,CAACG,OAAO,CAACC,QAAQ,CAAC,cAAc,CAAC,EAAE;AAC/C,MAAA;AACF;AACA;IACAH,IAAI,CAACD,OAAO,CAAC;GACd;AACH;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,aAAaA,CAACpG,WAAW,EAAErC,aAAa,EAAgB;EAAA,IAAA0I,gBAAA,EAAAC,cAAA;AAAA,EAAA,IAAd1I,OAAO,GAAA2I,SAAA,CAAA9H,MAAA,GAAA,CAAA,IAAA8H,SAAA,CAAA,CAAA,CAAA,KAAAC,SAAA,GAAAD,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;AAC7D,EAAA,IAAME,OAAO,GAAAJ,CAAAA,gBAAA,GAAGzI,OAAO,CAAC6I,OAAO,MAAA,IAAA,IAAAJ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K,CAAA,qCAAA,CAAAxD,MAAA,CAAuCmB,MAAM,SAAM,CAAC;AACjEsC,QAAAA,OAAO,CAACC,GAAG,CAACsE,aAAa,EAAE;AAAErE,UAAAA,KAAK,EAAE;AAAK,SAAC,CAAC;AAC7C;AACF;AAAC,GAAA,CAAA,OAAA5C,GAAA,EAAA;IAAAT,SAAA,CAAAU,CAAA,CAAAD,GAAA,CAAA;AAAA,GAAA,SAAA;AAAAT,IAAAA,SAAA,CAAAW,CAAA,EAAA;AAAA;AACD,EAAA,IAAIjC,OAAO,CAACwE,KAAK,KAAK,IAAI,EAAE;AAC1BC,IAAAA,OAAO,CAACD,KAAK,CAAC,kDAAkD,CAAC;AACjEC,IAAAA,OAAO,CAACC,GAAG,CAACoE,MAAM,EAAE;AAAEnE,MAAAA,KAAK,EAAE;AAAK,KAAC,CAAC;AACtC;AACA,EAAA,OAAOmE,MAAM;AACf;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"rollup-builder.mjs","sources":["../src/get-rollup-external.mjs","../src/get-rollup-output.mjs","../src/plugins/config-alias-plugin.mjs","../src/plugins/config-node-resolve-plugin.mjs","../src/plugins/config-common-js-plugin.mjs","../src/plugins/config-babel-plugin.mjs","../src/plugins/config-terser-plugin.mjs","../src/plugins/config-analyzer-plugin.mjs","../src/plugins/config-visualizer-plugin.mjs","../src/get-rollup-plugins.mjs","../src/get-rollup-on-warn.mjs","../src/rollup-builder.mjs","../src/index.mjs"],"sourcesContent":["////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport { createRequire } from 'node:module';\n\n/**\n * Gets Rollup `external` configuration.\n *\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @returns {function}\n * The predicate used as the Rollup `external` configuration for the library.\n * @author Haixing Hu\n */\nfunction getRollupExternal(importMetaUrl, options) {\n if (!importMetaUrl) {\n throw new Error('importMetaUrl is required');\n }\n if (!options) {\n throw new Error('options is required');\n }\n // gets all peerDependencies packages from 'package.json' of the caller module\n const require = createRequire(importMetaUrl);\n const pkg = require('./package.json');\n const peers = [...Object.keys(pkg.peerDependencies || {})];\n if (!Array.isArray(peers)) {\n throw new Error('peerDependencies should be an array');\n }\n if (peers.length === 0) {\n return [];\n }\n const peerPattern = (peers ? new RegExp(`^(${peers.join('|')})($|/)`) : null);\n // gets the additional external packages from the user passed options\n const additions = options.externals ?? [];\n // save some configuration to the options object\n options.peers = peers;\n options.peerPattern = peerPattern;\n return (id) => {\n if (peerPattern && peerPattern.test(id)) {\n return true;\n }\n for (const pattern of additions) {\n if ((pattern instanceof RegExp) && pattern.test(id)) {\n return true;\n }\n if (((typeof pattern === 'string') || (pattern instanceof String)) && (pattern === id)) {\n return true;\n }\n }\n return false;\n };\n}\n\nexport default getRollupExternal;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Gets the Rollup `output` configuration.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} libraryName\n * The name of the library.\n * @param {object} options\n * The additional options for building the library.\n * @returns {object}\n * The Rollup output configuration for the library.\n * @author Haixing Hu\n */\nfunction getRollupOutput(format, libraryName, options) {\n let filenameExt = '';\n let footer = '';\n let exports = options.exports ?? 'auto';\n switch (format) {\n case 'cjs': // drop down\n case 'umd': // drop down\n filenameExt = (format === 'cjs' ? '.cjs' : `.${format}.js`);\n // The following workaround is to solve the following issue: If an ESM\n // module has both default export and named exports, the rollup cannot\n // handle it correctly. For example, the following is a source ESM module:\n // ```js\n // export { Foo, Bar };\n // export default Foo;\n // ```\n // The rollup will translate it into the following codes:\n // ```js\n // exports.Foo = Foo;\n // exports.Bar = Bar;\n // exports.default = Foo;\n // ```\n // However, a common-js consumer will use the module as follows:\n // ```js\n // const Foo = require('my-module');\n // ```\n // which will cause an error. The correct usage should be\n // ```js\n // const Foo = require('my-module').default\n // ```\n // But unfortunately, the rollup will translate the ESM default import as\n // follows:\n // ```js\n // import Foo from 'my-module';\n // ```\n // will be translated by rollup to\n // ```js\n // const Foo = require('my-module');\n // ```\n // Note that the above translation has no `.default` suffix, which will\n // cause an error.\n //\n // The workaround is copied from the source code of the official rollup\n // plugins:\n // https://github.com/rollup/plugins/blob/master/shared/rollup.config.mjs\n //\n // It adds a simple footer statements to each `CJS` format bundle:\n // ```js\n // module.exports = Object.assign(exports.default, exports);\n // ```\n //\n // See:\n // [1] https://rollupjs.org/configuration-options/#output-exports\n // [2] https://github.com/rollup/rollup/issues/1961\n // [3] https://stackoverflow.com/questions/58246998/mixing-default-and-named-exports-with-rollup\n // [4] https://github.com/avisek/rollup-patch-seamless-default-export\n // [5] https://github.com/rollup/plugins/blob/master/shared/rollup.config.mjs\n //\n if (exports === 'mixed') {\n exports = 'named';\n footer = 'module.exports = Object.assign(exports.default, exports);';\n }\n break;\n case 'amd': // drop down\n case 'iife':\n filenameExt = `.${format}.js`;\n if (exports === 'mixed') {\n exports = 'auto';\n }\n break;\n case 'es': // drop down\n case 'esm': // drop down\n case 'module':\n format = 'es';\n filenameExt = '.mjs';\n // fix the exports, because the ESM format does not support the 'mixed' exports mode\n if (exports === 'mixed') {\n exports = 'auto';\n }\n break;\n default:\n throw new Error(`Unsupported library format: ${format}`);\n }\n const nodeEnv = options.nodeEnv ?? process.env.NODE_ENV;\n const minify = options.minify ?? (nodeEnv === 'production');\n const camelCaseToDashCase = (s) => s.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n const filenamePrefix = options.filenamePrefix ?? camelCaseToDashCase(libraryName);\n const filenameBase = `${filenamePrefix}${minify ? '.min' : ''}`;\n const filename = `${filenameBase}${filenameExt}`;\n const outputDir = options.outputDir ?? 'dist';\n const sourcemap = options.sourcemap ?? true;\n // save some configuration to the options object\n options.format = format;\n options.name = libraryName;\n options.minify = minify;\n options.filenamePrefix = filenamePrefix;\n options.filenameBase = filenameBase;\n options.filenameExt = filenameExt;\n options.filename = filename;\n options.exports = exports;\n options.sourcemap = sourcemap;\n options.outputDir = outputDir;\n return {\n name: libraryName,\n file: `${outputDir}/${filename}`,\n format,\n exports,\n footer,\n sourcemap,\n compact: minify,\n };\n}\n\nexport default getRollupOutput;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport { fileURLToPath } from 'node:url';\nimport alias from '@rollup/plugin-alias';\n\n/**\n * Configures the `@rollup/plugin-alias` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array<Object>} plugins\n * The Rollup plugins array.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-alias\n */\nfunction configAliasPlugin(format, importMetaUrl, options, plugins) {\n if (options.useAliasPlugin ?? true) {\n // The @rollup/plugin-alias enables us to use absolute import paths for\n // \"src\" (or any other path you want to configure).\n const pluginOptions = options.aliasPluginOptions ?? {\n entries: {\n 'src': fileURLToPath(new URL('src', importMetaUrl)),\n },\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-alias plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(alias(pluginOptions));\n }\n return plugins;\n}\n\nexport default configAliasPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport nodeResolve from '@rollup/plugin-node-resolve';\n\n/**\n * Configures the `@rollup/plugin-node-resolve` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array<Object>} plugins\n * The Rollup plugins array.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-node-resolve\n */\nfunction configNodeResolvePlugin(format, importMetaUrl, options, plugins) {\n if (options.useNodeResolvePlugin ?? true) {\n // The @rollup/plugin-node-resolve allows Rollup to resolve external\n // modules from node_modules:\n const pluginOptions = options.nodeResolvePluginOptions ?? {};\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-node-resolve plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(nodeResolve(pluginOptions));\n }\n return plugins;\n}\n\nexport default configNodeResolvePlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport commonjs from '@rollup/plugin-commonjs';\n\n/**\n * Configures the `@rollup/plugin-commonjs` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array<Object>} plugins\n * The Rollup plugins array.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-commonjs\n */\nfunction configCommonJsPlugin(format, importMetaUrl, options, plugins) {\n if (options.useCommonjsPlugin ?? true) {\n // The @rollup/plugin-commonjs plugin converts 3rd-party CommonJS modules\n // into ES6 code, so that they can be included in our Rollup bundle.\n // When using @rollup/plugin-babel with @rollup/plugin-commonjs in the\n // same Rollup configuration, it's important to note that\n // @rollup/plugin-commonjs must be placed before this plugin in the\n // plugins array for the two to work together properly.\n const pluginOptions = options.commonjsPluginOptions ?? {\n include: ['node_modules/**'],\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-commonjs plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(commonjs(pluginOptions));\n }\n return plugins;\n}\n\nexport default configCommonJsPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport babel from '@rollup/plugin-babel';\n\n/**\n * Configures the `@rollup/plugin-babel` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array} plugins\n * The array of Rollup plugins.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-babel\n */\nfunction configBabelPlugin(format, importMetaUrl, options, plugins) {\n if (options.useBabelPlugin ?? true) {\n const pluginOptions = options.babelPluginOptions ?? {\n babelHelpers: 'runtime',\n exclude: ['node_modules/**'],\n presets: [\n // The @babel/preset-env preset enables Babel to transpile ES6+ code\n // and the rollup requires that Babel keeps ES6 module syntax intact.\n ['@babel/preset-env', { modules: false }],\n ],\n plugins: [\n '@babel/plugin-transform-runtime',\n ],\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-babel plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(babel(pluginOptions));\n }\n return plugins;\n}\n\nexport default configBabelPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport terser from '@rollup/plugin-terser';\n\n/**\n * Configures the `@rollup/plugin-terser` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array} plugins\n * The array of Rollup plugins.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/@rollup/plugin-terser\n */\nfunction configTerserPlugin(format, importMetaUrl, options, plugins) {\n const nodeEnv = options.nodeEnv ?? process.env.NODE_ENV;\n const minify = options.minify ?? (nodeEnv === 'production');\n if (minify) {\n // The @rollup/plugin-terser uses terser under the hood to minify the code.\n const pluginOptions = options.terserPluginOptions ?? {\n output: {\n comments: false, // default to remove all comments\n },\n keep_classnames: true, // keep the class names\n keep_fnames: true, // keep the function names\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The @rollup/plugin-terser plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(terser(pluginOptions));\n }\n return plugins;\n}\n\nexport default configTerserPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport analyzer from 'rollup-plugin-analyzer';\n\n/**\n * Configures the `rollup-plugin-analyzer` plugin.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array} plugins\n * The array of Rollup plugins.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/rollup-plugin-analyzer\n */\nfunction configAnalyzerPlugin(format, importMetaUrl, options, plugins) {\n if (options.useAnalyzerPlugin ?? true) {\n // The rollup-plugin-analyzer will print out some useful info about our\n // generated bundle upon successful builds.\n const pluginOptions = options.analyzerPluginOptions ?? {\n hideDeps: true,\n limit: 0,\n summaryOnly: true,\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The rollup-plugin-analyzer plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(analyzer(pluginOptions));\n }\n return plugins;\n}\n\nexport default configAnalyzerPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport { visualizer } from 'rollup-plugin-visualizer';\n\n/**\n * Configures the `rollup-plugin-visualizer` plugin.\n *\n * The `rollup-plugin-visualizer` will visualize and analyze your Rollup\n * bundle to see which modules are taking up space.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @param {Array} plugins\n * The array of Rollup plugins.\n * @returns {Array<Object>}\n * The modified Rollup plugins array.\n * @author Haixing Hu\n * @see https://www.npmjs.com/package/rollup-plugin-visualizer\n */\nfunction configVisualizerPlugin(format, importMetaUrl, options, plugins) {\n if (options.useVisualizerPlugin ?? true) {\n // The rollup-plugin-visualizer will visualize and analyze your Rollup\n // bundle to see which modules are taking up space.\n const pluginOptions = options.visualizerPluginOptions ?? {\n filename: `./doc/${options.filenameBase}.visualization.html`,\n gzipSize: true,\n brotliSize: true,\n };\n if (options.debug === true) {\n console.debug('[DEBUG] The rollup-plugin-visualizer plugin options are:');\n console.dir(pluginOptions, { depth: null });\n }\n plugins.push(visualizer(pluginOptions));\n }\n return plugins;\n}\n\nexport default configVisualizerPlugin;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport json from '@rollup/plugin-json';\nimport configAliasPlugin from './plugins/config-alias-plugin.mjs';\nimport configNodeResolvePlugin from './plugins/config-node-resolve-plugin.mjs';\nimport configCommonJsPlugin from './plugins/config-common-js-plugin.mjs';\nimport configBabelPlugin from './plugins/config-babel-plugin.mjs';\nimport configTerserPlugin from './plugins/config-terser-plugin.mjs';\nimport configAnalyzerPlugin from './plugins/config-analyzer-plugin.mjs';\nimport configVisualizerPlugin from './plugins/config-visualizer-plugin.mjs';\n\n/**\n * Gets Rollup `plugins` configuration.\n *\n * @param {string} format\n * The format of the library.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module.\n * @param {object} options\n * The additional options for building the library.\n * @returns {Array<Object>}\n * The Rollup plugins array.\n * @author Haixing Hu\n */\nfunction getRollupPlugins(format, importMetaUrl, options) {\n const plugins = [];\n plugins.push(json());\n configAliasPlugin(format, importMetaUrl, options, plugins);\n configNodeResolvePlugin(format, importMetaUrl, options, plugins);\n configCommonJsPlugin(format, importMetaUrl, options, plugins);\n configBabelPlugin(format, importMetaUrl, options, plugins);\n configTerserPlugin(format, importMetaUrl, options, plugins);\n configAnalyzerPlugin(format, importMetaUrl, options, plugins);\n configVisualizerPlugin(format, importMetaUrl, options, plugins);\n // The user can specify additional plugins.\n if (options.plugins) {\n plugins.push(...options.plugins);\n }\n return plugins;\n}\n\nexport default getRollupPlugins;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2024.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\n\nfunction getRollupOnWarn() {\n return function onWarn(warning, warn) {\n // skip certain warnings\n if (warning.code === 'INVALID_ANNOTATION'\n && warning.message.includes('#__PURE__')\n && warning.message.includes('terser')) {\n return;\n }\n if (warning.code === 'CIRCULAR_DEPENDENCY'\n && warning.message.includes('node_modules')) {\n return;\n }\n // Use default for everything else\n warn(warning);\n };\n}\n\nexport default getRollupOnWarn;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport getRollupExternal from './get-rollup-external.mjs';\nimport getRollupOutput from './get-rollup-output.mjs';\nimport getRollupPlugins from './get-rollup-plugins.mjs';\nimport getRollupOnWarn from './get-rollup-on-warn.mjs';\n\n/**\n * Builds the Rollup configuration for a library.\n *\n * The function could be provided with an additional options for building the\n * library. It can have the following fields:\n *\n * - `debug: boolean`: whether to print the debug information. If this field is\n * not specified, the default value is `false`.\n * - `formats: [string]`: the array of formats of the library. It can be an\n * array of the following values:\n * - `'cjs'`: the CommonJS format.\n * - `'umd'`: the UMD format.\n * - `'esm'`: the ES module format.\n *\n * If this field is not specified, the default value is `['cjs', 'esm']`.\n * - `exports: string`: the export mode to use. It can be one of the following\n * values:\n * - `'auto'`: automatically guesses your intentions based on what the input\n * module exports.\n * - `'default'`: if you are only exporting one thing using `export default ...`;\n * note that this can cause issues when generating CommonJS output that is\n * meant to be interchangeable with ESM output.\n * - `'named'`: if you are using named exports.\n * - `'none'`: if you are not exporting anything (e.g. you are building an\n * app, not a library)\n * - `'mixed'`: if you are using named exports mixed with a default export.\n * Note that this is not a standard exports mode officially supported by\n * the `rollup`, instead, it is an additional mode add by this library.\n *\n * See [output.exports](https://rollupjs.org/configuration-options/#output-exports)\n * for more details. If this field is not specified, the default value is\n * `'auto'`.\n * - `nodeEnv: string`: the value of the `NODE_ENV` environment variable. If\n * this field is not specified, the default value is `process.env.NODE_ENV`.\n * - `minify: boolean`: whether to minify the code. If this field is not\n * specified, and the `nodeEnv` is `production`, the default value is `true`;\n * otherwise the default value is `false`.\n * - `sourcemap: boolean`: whether to generate the source map. If this field is\n * not specified, the default value is `true`.\n * - `input: string`: the input file of the library. If this field is not\n * specified, the default value is `src/index.js`.\n * - `outputDir: string`: the output directory of the library. If this field is\n * not specified, the default value is `dist`.\n * - `filenamePrefix: string`: the prefix of the output filename. If this field\n * is not specified, the default value is the dash case of the library name.\n * For example, if the library name is `MyLibrary`, the default value of this\n * field is `my-library`.\n * - `externals: [string]`: the array of additional external packages, each can\n * be specified with either a string or a regular expression. If this field is\n * not specified, the default value is an empty array.\n * - `useAliasPlugin: boolean`: whether to use the `@rollup/plugin-alias` plugin.\n * If this field is not specified, the default value is `true`.\n * - `aliasPluginOptions: object`: the options for the `@rollup/plugin-alias`\n * plugin. If this field is not specified, the default value is:\n * ```js\n * {\n * entries: {\n * 'src': fileURLToPath(new URL('src', importMetaUrl)),\n * },\n * }\n * ```\n * - `useNodeResolvePlugin: boolean`: whether to use the `@rollup/plugin-node-resolve`\n * plugin. If this field is not specified, the default value is `true`.\n * - `nodeResolvePluginOptions: object`: the options for the `@rollup/plugin-node-resolve`\n * plugin. If this field is not specified, the default value is: `{}`.\n * - `useCommonjsPlugin: boolean`: whether to use the `@rollup/plugin-commonjs`\n * plugin. If this field is not specified, the default value is `true`.\n * - `commonjsPluginOptions: object`: the options for the `@rollup/plugin-commonjs`\n * plugin. If this field is not specified, the default value is:\n * ```js\n * {\n * include: ['node_modules/**'],\n * }\n * ```\n * - `useBabelPlugin: boolean`: whether to use the `@rollup/plugin-babel` plugin.\n * If this field is not specified, the default value is `true`.\n * - `babelPluginOptions: object`: the options for the `@rollup/plugin-babel`\n * plugin. If this field is not specified, the default value is:\n * ```js\n * {\n * babelHelpers: 'runtime',\n * exclude: ['node_modules/**'],\n * presets: [\n * '@babel/preset-env',\n * ],\n * plugins: [\n * '@babel/plugin-transform-runtime',\n * ],\n * }\n * ```\n * Note that when using the `@rollup/plugin-babel` plugin, you can also specify\n * the configuration of Babel in the standard Babel configuration files,\n * such as `babel.config.js`, `.babelrc`, etc.\n * - `terserOptions: object`: the options for the `@rollup/plugin-terser` plugin.\n * If this field is not specified, the default value is: `{}`. Whether to use\n * the `@rollup/plugin-terser` plugin depends on the `minify` field of the\n * options or the `NODE_ENV` environment variable.\n * - `useAnalyzerPlugin: boolean`: whether to use the `rollup-plugin-analyzer`\n * plugin. If this field is not specified, the default value is `true`.\n * - `analyzerOptions: object`: the options for the `rollup-plugin-analyzer`\n * plugin. If this field is not specified, the default value is:\n * ```js\n * {\n * hideDeps: true,\n * limit: 0,\n * summaryOnly: true,\n * }\n * ```\n * - `plugins: [object]`: the array of configuration of additional Rollup\n * plugins. If this field is not specified, the default value is an empty\n * array.\n *\n * @param {string} libraryName\n * The name of the library, which will be used as the name of the global\n * variable in the UMD format. It should in the camel case.\n * @param {string} importMetaUrl\n * The URL of the `import.meta` of the caller module. It **MUST** be passed\n * with the `import.meta.url` of the caller module.\n * @param {object} options\n * The additional options for building the library, as described above.\n * @returns {Array<object>}\n * the array of Rollup configurations for the library.\n */\nfunction rollupBuilder(libraryName, importMetaUrl, options = {}) {\n const formats = options.formats ?? ['cjs', 'esm'];\n const result = [];\n const input = options.input ?? 'src/index.js';\n for (const format of formats) {\n const clonedOptions = { ...options };\n const output = getRollupOutput(format, libraryName, clonedOptions);\n const external = getRollupExternal(importMetaUrl, clonedOptions);\n const plugins = getRollupPlugins(format, importMetaUrl, clonedOptions);\n const onwarn = getRollupOnWarn();\n const config = { input, output, external, plugins, onwarn };\n result.push(config);\n if (options.debug === true) {\n console.debug(`[DEBUG] The options for the format ${format} is:`);\n console.dir(clonedOptions, { depth: null });\n }\n }\n if (options.debug === true) {\n console.debug('[DEBUG] The generated rollup configurations are:');\n console.dir(result, { depth: null });\n }\n return result;\n}\n\nexport default rollupBuilder;\n","////////////////////////////////////////////////////////////////////////////////\n//\n// Copyright (c) 2022 - 2023.\n// Haixing Hu, Qubit Co. Ltd.\n//\n// All rights reserved.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport rollupBuilder from './rollup-builder.mjs';\n\nexport default rollupBuilder;\n"],"names":["getRollupExternal","importMetaUrl","options","_options$externals","Error","require","createRequire","pkg","peers","_toConsumableArray","Object","keys","peerDependencies","Array","isArray","length","peerPattern","RegExp","concat","join","additions","externals","id","test","_iterator","_createForOfIteratorHelper","_step","s","n","done","pattern","value","String","err","e","f","getRollupOutput","format","libraryName","_options$exports","_options$nodeEnv","_options$minify","_options$filenamePref","_options$outputDir","_options$sourcemap","filenameExt","footer","exports","nodeEnv","process","env","NODE_ENV","minify","camelCaseToDashCase","replace","toLowerCase","filenamePrefix","filenameBase","filename","outputDir","sourcemap","name","file","compact","configAliasPlugin","plugins","_options$useAliasPlug","useAliasPlugin","_options$aliasPluginO","pluginOptions","aliasPluginOptions","entries","fileURLToPath","URL","debug","console","dir","depth","push","alias","configNodeResolvePlugin","_options$useNodeResol","useNodeResolvePlugin","_options$nodeResolveP","nodeResolvePluginOptions","nodeResolve","configCommonJsPlugin","_options$useCommonjsP","useCommonjsPlugin","_options$commonjsPlug","commonjsPluginOptions","include","commonjs","configBabelPlugin","_options$useBabelPlug","useBabelPlugin","_options$babelPluginO","babelPluginOptions","babelHelpers","exclude","presets","modules","babel","configTerserPlugin","_options$terserPlugin","terserPluginOptions","output","comments","keep_classnames","keep_fnames","terser","configAnalyzerPlugin","_options$useAnalyzerP","useAnalyzerPlugin","_options$analyzerPlug","analyzerPluginOptions","hideDeps","limit","summaryOnly","analyzer","configVisualizerPlugin","_options$useVisualize","useVisualizerPlugin","_options$visualizerPl","visualizerPluginOptions","gzipSize","brotliSize","visualizer","getRollupPlugins","json","apply","getRollupOnWarn","onWarn","warning","warn","code","message","includes","rollupBuilder","_options$formats","_options$input","arguments","undefined","formats","result","input","clonedOptions","_objectSpread","external","onwarn","config"],"mappings":";;;;;;;;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiBA,CAACC,aAAa,EAAEC,OAAO,EAAE;AAAA,EAAA,IAAAC,kBAAA;EACjD,IAAI,CAACF,aAAa,EAAE;AAClB,IAAA,MAAM,IAAIG,KAAK,CAAC,2BAA2B,CAAC;AAC9C;EACA,IAAI,CAACF,OAAO,EAAE;AACZ,IAAA,MAAM,IAAIE,KAAK,CAAC,qBAAqB,CAAC;AACxC;AACA;AACA,EAAA,IAAMC,OAAO,GAAGC,aAAa,CAACL,aAAa,CAAC;AAC5C,EAAA,IAAMM,GAAG,GAAGF,OAAO,CAAC,gBAAgB,CAAC;AACrC,EAAA,IAAMG,KAAK,GAAAC,kBAAA,CAAOC,MAAM,CAACC,IAAI,CAACJ,G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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,aAAaA,CAACpG,WAAW,EAAErC,aAAa,EAAgB;EAAA,IAAA0I,gBAAA,EAAAC,cAAA;AAAA,EAAA,IAAd1I,OAAO,GAAA2I,SAAA,CAAA9H,MAAA,GAAA,CAAA,IAAA8H,SAAA,CAAA,CAAA,CAAA,KAAAC,SAAA,GAAAD,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;AAC7D,EAAA,IAAME,OAAO,GAAAJ,CAAAA,gBAAA,GAAGzI,OAAO,CAAC6I,OAAO,MAAA,IAAA,IAAAJ,gBAAA,KAAA,SAAA,GAAAA,gBAAA,GAAI,CAAC,KAAK,EAAE,KAAK,CAAC;EACjD,IAAMK,MAAM,GAAG,EAAE;AACjB,EAAA,IAAMC,KAAK,GAAA,CAAAL,cAAA,GAAG1I,OAAO,CAAC+I,KAAK,MAAA,IAAA,IAAAL,cAAA,KAAA,SAAA,GAAAA,cAAA,GAAI,cAAc;AAAC,EAAA,IAAApH,SAAA,GAAAC,0BAAA,CACzBsH,OAAO,CAAA;IAAArH,KAAA;AAAA,EAAA,IAAA;IAA5B,KAAAF,SAAA,CAAAG,CAAA,EAAAD,EAAAA,CAAAA,CAAAA,KAAA,GAAAF,SAAA,CAAAI,CAAA,EAAAC,E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CAACC,GAAG,CAACoE,MAAM,EAAE;AAAEnE,MAAAA,KAAK,EAAE;AAAK,KAAC,CAAC;AACtC;AACA,EAAA,OAAOmE,MAAM;AACf;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
package/doc/api/global.html
CHANGED
|
@@ -2903,7 +2903,7 @@ with the <code>import.meta.url</code> of the caller module.</p>
|
|
|
2903
2903
|
|
|
2904
2904
|
<footer>
|
|
2905
2905
|
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a>
|
|
2906
|
-
on
|
|
2906
|
+
on Tue Jan 07 2025 22:30:02 GMT+0800 (China Standard Time)
|
|
2907
2907
|
using the <a href="https://github.com/Haixing-Hu/jsdoc-minami">customized Minami theme</a>.
|
|
2908
2908
|
</footer>
|
|
2909
2909
|
|
package/doc/api/index.html
CHANGED
|
@@ -408,7 +408,7 @@ See the <a href="LICENSE">LICENSE</a> file for details.</p></article>
|
|
|
408
408
|
|
|
409
409
|
<footer>
|
|
410
410
|
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a>
|
|
411
|
-
on
|
|
411
|
+
on Tue Jan 07 2025 22:30:02 GMT+0800 (China Standard Time)
|
|
412
412
|
using the <a href="https://github.com/Haixing-Hu/jsdoc-minami">customized Minami theme</a>.
|
|
413
413
|
</footer>
|
|
414
414
|
|
|
@@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {
|
|
|
4929
4929
|
</script>
|
|
4930
4930
|
<script>
|
|
4931
4931
|
/*<!--*/
|
|
4932
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"rollup-builder.min.mjs","children":[{"name":"src","children":[{"uid":"
|
|
4932
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"rollup-builder.min.mjs","children":[{"name":"src","children":[{"uid":"b32a2eaf-1","name":"get-rollup-external.mjs"},{"uid":"b32a2eaf-3","name":"get-rollup-output.mjs"},{"name":"plugins","children":[{"uid":"b32a2eaf-5","name":"config-alias-plugin.mjs"},{"uid":"b32a2eaf-7","name":"config-node-resolve-plugin.mjs"},{"uid":"b32a2eaf-9","name":"config-common-js-plugin.mjs"},{"uid":"b32a2eaf-11","name":"config-babel-plugin.mjs"},{"uid":"b32a2eaf-13","name":"config-terser-plugin.mjs"},{"uid":"b32a2eaf-15","name":"config-analyzer-plugin.mjs"},{"uid":"b32a2eaf-17","name":"config-visualizer-plugin.mjs"}]},{"uid":"b32a2eaf-19","name":"get-rollup-plugins.mjs"},{"uid":"b32a2eaf-21","name":"get-rollup-on-warn.mjs"},{"uid":"b32a2eaf-23","name":"rollup-builder.mjs"},{"uid":"b32a2eaf-25","name":"index.mjs"}]}]}],"isRoot":true},"nodeParts":{"b32a2eaf-1":{"renderedLength":3357,"gzipLength":1388,"brotliLength":1205,"metaUid":"b32a2eaf-0"},"b32a2eaf-3":{"renderedLength":5374,"gzipLength":1685,"brotliLength":1414,"metaUid":"b32a2eaf-2"},"b32a2eaf-5":{"renderedLength":1666,"gzipLength":653,"brotliLength":560,"metaUid":"b32a2eaf-4"},"b32a2eaf-7":{"renderedLength":1596,"gzipLength":599,"brotliLength":480,"metaUid":"b32a2eaf-6"},"b32a2eaf-9":{"renderedLength":1925,"gzipLength":752,"brotliLength":629,"metaUid":"b32a2eaf-8"},"b32a2eaf-11":{"renderedLength":1794,"gzipLength":719,"brotliLength":627,"metaUid":"b32a2eaf-10"},"b32a2eaf-13":{"renderedLength":1891,"gzipLength":724,"brotliLength":608,"metaUid":"b32a2eaf-12"},"b32a2eaf-15":{"renderedLength":1648,"gzipLength":651,"brotliLength":523,"metaUid":"b32a2eaf-14"},"b32a2eaf-17":{"renderedLength":1858,"gzipLength":691,"brotliLength":594,"metaUid":"b32a2eaf-16"},"b32a2eaf-19":{"renderedLength":1088,"gzipLength":403,"brotliLength":326,"metaUid":"b32a2eaf-18"},"b32a2eaf-21":{"renderedLength":691,"gzipLength":317,"brotliLength":264,"metaUid":"b32a2eaf-20"},"b32a2eaf-23":{"renderedLength":9716,"gzipLength":3013,"brotliLength":2588,"metaUid":"b32a2eaf-22"},"b32a2eaf-25":{"renderedLength":264,"gzipLength":101,"brotliLength":98,"metaUid":"b32a2eaf-24"}},"nodeMetas":{"b32a2eaf-0":{"id":"/src/get-rollup-external.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-1"},"imported":[{"uid":"b32a2eaf-27"},{"uid":"b32a2eaf-28"}],"importedBy":[{"uid":"b32a2eaf-22"}]},"b32a2eaf-2":{"id":"/src/get-rollup-output.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-3"},"imported":[],"importedBy":[{"uid":"b32a2eaf-22"}]},"b32a2eaf-4":{"id":"/src/plugins/config-alias-plugin.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-5"},"imported":[{"uid":"b32a2eaf-30"},{"uid":"b32a2eaf-31"}],"importedBy":[{"uid":"b32a2eaf-18"}]},"b32a2eaf-6":{"id":"/src/plugins/config-node-resolve-plugin.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-7"},"imported":[{"uid":"b32a2eaf-32"}],"importedBy":[{"uid":"b32a2eaf-18"}]},"b32a2eaf-8":{"id":"/src/plugins/config-common-js-plugin.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-9"},"imported":[{"uid":"b32a2eaf-33"}],"importedBy":[{"uid":"b32a2eaf-18"}]},"b32a2eaf-10":{"id":"/src/plugins/config-babel-plugin.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-11"},"imported":[{"uid":"b32a2eaf-34"}],"importedBy":[{"uid":"b32a2eaf-18"}]},"b32a2eaf-12":{"id":"/src/plugins/config-terser-plugin.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-13"},"imported":[{"uid":"b32a2eaf-35"}],"importedBy":[{"uid":"b32a2eaf-18"}]},"b32a2eaf-14":{"id":"/src/plugins/config-analyzer-plugin.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-15"},"imported":[{"uid":"b32a2eaf-36"}],"importedBy":[{"uid":"b32a2eaf-18"}]},"b32a2eaf-16":{"id":"/src/plugins/config-visualizer-plugin.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-17"},"imported":[{"uid":"b32a2eaf-37"}],"importedBy":[{"uid":"b32a2eaf-18"}]},"b32a2eaf-18":{"id":"/src/get-rollup-plugins.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-19"},"imported":[{"uid":"b32a2eaf-27"},{"uid":"b32a2eaf-29"},{"uid":"b32a2eaf-4"},{"uid":"b32a2eaf-6"},{"uid":"b32a2eaf-8"},{"uid":"b32a2eaf-10"},{"uid":"b32a2eaf-12"},{"uid":"b32a2eaf-14"},{"uid":"b32a2eaf-16"}],"importedBy":[{"uid":"b32a2eaf-22"}]},"b32a2eaf-20":{"id":"/src/get-rollup-on-warn.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-21"},"imported":[],"importedBy":[{"uid":"b32a2eaf-22"}]},"b32a2eaf-22":{"id":"/src/rollup-builder.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-23"},"imported":[{"uid":"b32a2eaf-26"},{"uid":"b32a2eaf-0"},{"uid":"b32a2eaf-2"},{"uid":"b32a2eaf-18"},{"uid":"b32a2eaf-20"}],"importedBy":[{"uid":"b32a2eaf-24"}]},"b32a2eaf-24":{"id":"/src/index.mjs","moduleParts":{"rollup-builder.min.mjs":"b32a2eaf-25"},"imported":[{"uid":"b32a2eaf-22"}],"importedBy":[],"isEntry":true},"b32a2eaf-26":{"id":"@babel/runtime/helpers/defineProperty","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-22"}],"isExternal":true},"b32a2eaf-27":{"id":"@babel/runtime/helpers/toConsumableArray","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-0"},{"uid":"b32a2eaf-18"}],"isExternal":true},"b32a2eaf-28":{"id":"node:module","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-0"}],"isExternal":true},"b32a2eaf-29":{"id":"@rollup/plugin-json","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-18"}],"isExternal":true},"b32a2eaf-30":{"id":"node:url","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-4"}],"isExternal":true},"b32a2eaf-31":{"id":"@rollup/plugin-alias","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-4"}],"isExternal":true},"b32a2eaf-32":{"id":"@rollup/plugin-node-resolve","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-6"}],"isExternal":true},"b32a2eaf-33":{"id":"@rollup/plugin-commonjs","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-8"}],"isExternal":true},"b32a2eaf-34":{"id":"@rollup/plugin-babel","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-10"}],"isExternal":true},"b32a2eaf-35":{"id":"@rollup/plugin-terser","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-12"}],"isExternal":true},"b32a2eaf-36":{"id":"rollup-plugin-analyzer","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-14"}],"isExternal":true},"b32a2eaf-37":{"id":"rollup-plugin-visualizer","moduleParts":{},"imported":[],"importedBy":[{"uid":"b32a2eaf-16"}],"isExternal":true}},"env":{"rollup":"4.30.1"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
|
|
4933
4933
|
|
|
4934
4934
|
const run = () => {
|
|
4935
4935
|
const width = window.innerWidth;
|