From 1c61a17687d3e4d317bd9af9ac64a0fe9fa7ffb8 Mon Sep 17 00:00:00 2001 From: Christoph Reiter <reiter.christoph@gmail.com> Date: Wed, 3 Feb 2021 11:40:57 +0100 Subject: [PATCH] showcase: port to babel output plugin like everything else --- toolkit-showcase/rollup.config.js | 37 +++++++++++-------------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/toolkit-showcase/rollup.config.js b/toolkit-showcase/rollup.config.js index a232dcd3..27c12f82 100644 --- a/toolkit-showcase/rollup.config.js +++ b/toolkit-showcase/rollup.config.js @@ -12,7 +12,7 @@ import license from 'rollup-plugin-license'; import del from 'rollup-plugin-delete'; import md from 'rollup-plugin-md'; import emitEJS from 'rollup-plugin-emit-ejs' -import babel from '@rollup/plugin-babel' +import {getBabelOutputPlugin} from '@rollup/plugin-babel'; import appConfig from './app.config.js'; import {generateTLSConfig, getBuildInfo, getPackagePath, getDistPath} from '../rollup.utils.js'; @@ -191,30 +191,19 @@ Dependencies: {src: await getPackagePath('qr-scanner', 'qr-scanner-worker.*'), dest: 'dist/' + await getDistPath('@dbp-toolkit/qr-code-scanner')}, ], }), - useBabel && babel({ - include: [ - 'src/**', - 'node_modules/pdfjs-dist/**', // uses Promise.allSettled - ], - babelHelpers: 'runtime', - babelrc: false, - presets: [[ - '@babel/preset-env', { - loose: true, - bugfixes: true, - targets: { - esmodules: true + useBabel && getBabelOutputPlugin({ + compact: false, + presets: [[ + '@babel/preset-env', { + loose: true, + shippedProposals: true, + bugfixes: true, + modules: false, + targets: { + esmodules: true + } } - } - ]], - plugins: [[ - '@babel/plugin-transform-runtime', { - corejs: 3, - useESModules: true - } - ], - '@babel/plugin-syntax-dynamic-import', - '@babel/plugin-syntax-import-meta'] + ]], }), watch ? serve({ contentBase: '.', -- GitLab