@rollup/plugin-babel#getBabelOutputPlugin JavaScript Examples
The following examples show how to use
@rollup/plugin-babel#getBabelOutputPlugin.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: createRollupConfig.js From merkur with MIT License | 6 votes |
function createRollupES5Config() {
let config = createRollupConfig();
config.output = [
{
dir: './lib',
entryFileNames: '[name].es5.js',
format: 'cjs',
exports: 'named',
plugins: [getBabelOutputPlugin(babelES5BaseConfig), terser()],
},
];
return config;
}
Example #2
Source File: createRollupConfig.js From merkur with MIT License | 6 votes |
function createRollupES9Config() {
let config = createRollupConfig();
config.output = [
{
dir: './lib',
entryFileNames: '[name].es9.cjs',
format: 'cjs',
exports: 'named',
plugins: [getBabelOutputPlugin(babelES9BaseConfig)],
},
{
dir: './lib',
entryFileNames: '[name].es9.mjs',
format: 'esm',
exports: 'named',
plugins: [getBabelOutputPlugin(babelES9BaseConfig)],
},
];
return config;
}
Example #3
Source File: createRollupConfig.js From merkur with MIT License | 6 votes |
function createRollupUMDConfig() {
let config = createRollupConfig();
config.output = [
{
dir: './lib',
entryFileNames: '[name].umd.js',
format: 'esm',
plugins: [],
},
];
config.plugins.push(getBabelOutputPlugin(babelUMDConfig), terser());
return config;
}