Use rollup:intro to build the xdomain-index.js

This commit is contained in:
jfh
2020-09-13 01:27:40 +02:00
parent 0d34672c9a
commit 6c93cbf0b2
10 changed files with 39 additions and 42 deletions

View File

@@ -13,6 +13,8 @@ import nodePolyfills from 'rollup-plugin-node-polyfills';
import url from '@rollup/plugin-url'; // for XML/SVG files
import dynamicImportVars from '@rollup/plugin-dynamic-import-vars';
import {terser} from 'rollup-plugin-terser';
import progress from 'rollup-plugin-progress';
import filesize from 'rollup-plugin-filesize';
// utility function
const getDirectories = (source) => {
@@ -55,6 +57,7 @@ const config = [{
}
],
plugins: [
progress(),
copy({
targets: [
{
@@ -108,7 +111,8 @@ const config = [{
dynamicImportVars({include: `src/editor/locale.js`}),
babel({babelHelpers: 'bundled', exclude: [/\/core-js\//]}), // exclude core-js to avoid circular dependencies.
nodePolyfills(),
terser({keep_fnames: true}) // keep_fnames is needed to avoid an error when calling extensions.
terser({keep_fnames: true}), // keep_fnames is needed to avoid an error when calling extensions.
filesize()
]
}];
@@ -132,6 +136,7 @@ extensionDirs.forEach((extensionDir) => {
}
],
plugins: [
progress(),
url({
include: ['**/*.svg', '**/*.png', '**/*.jpg', '**/*.gif', '**/*.xml'],
limit: 0,