How to use @rollup/plugin-babel - 4 common examples

To help you get started, we’ve selected a few @rollup/plugin-babel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github datawrapper / datawrapper / src / v2 / rollup.config.js View on Github external
resolve({
                                        code: result.css.toString(),
                                        map: result.map.toString()
                                    });
                                }
                            );
                        });
                    }
                }
            }),

            resolve(),
            commonjs(),
            json(),

            babel({
                // don't exclude anything!
                // exclude: [/node_modules\/(?!(@datawrapper|svelte)\/).*/],
                extensions: ['.js', '.mjs', '.html'],
                babelHelpers: 'runtime',
                presets: [
                    [
                        '@babel/env',
                        {
                            targets: 'last 2 versions, not IE 10, not dead',
                            corejs: 3,
                            useBuiltIns: 'entry'
                        }
                    ]
                ],
                plugins: ['babel-plugin-transform-async-to-promises', '@babel/plugin-transform-runtime']
            }),
github datawrapper / datawrapper / src / rollup.config.js View on Github external
resolve({
                                        code: result.css.toString(),
                                        map: result.map.toString()
                                    });
                                }
                            );
                        });
                    }
                }
            }),

            resolve(),
            commonjs(),
            json(),

            babel({
                // don't exclude anything!
                // exclude: [/node_modules\/(?!(@datawrapper|svelte)\/).*/],
                extensions: ['.js', '.mjs', '.html'],
                babelHelpers: 'runtime',
                presets: [
                    [
                        '@babel/env',
                        {
                            targets: 'last 2 versions, not IE 10, not dead',
                            corejs: 3,
                            useBuiltIns: 'entry'
                        }
                    ]
                ],
                plugins: [
                    'babel-plugin-transform-async-to-promises',
github camba1 / gotemp / web / sapper / rollup.config.js View on Github external
'process.browser': true,
				'process.env.NODE_ENV': JSON.stringify(mode),
				'process.env.APIURL': JSON.stringify(apiUrl)
			}),
			svelte({
				dev,
				hydratable: true,
				emitCss: true
			}),
			resolve({
				browser: true,
				dedupe: ['svelte']
			}),
			commonjs(),

			legacy && babel({
				extensions: ['.js', '.mjs', '.html', '.svelte'],
				babelHelpers: 'runtime',
				exclude: ['node_modules/@babel/**'],
				presets: [
					['@babel/preset-env', {
						targets: '> 0.25%, not dead'
					}]
				],
				plugins: [
					'@babel/plugin-syntax-dynamic-import',
					['@babel/plugin-transform-runtime', {
						useESModules: true
					}]
				]
			}),
github caos / zitadel / site / rollup.config.js View on Github external
replace({
                'process.browser': true,
                'process.env.NODE_ENV': JSON.stringify(mode)
            }),
            svelte({
                dev,
                hydratable: true,
                emitCss: true
            }),
            resolve({
                browser: true,
                dedupe: ['svelte']
            }),
            commonjs(),

            legacy && babel({
                extensions: ['.js', '.mjs', '.html', '.svelte'],
                babelHelpers: 'runtime',
                exclude: ['node_modules/@babel/**'],
                presets: [
                    ['@babel/preset-env', {
                        targets: '> 0.25%, not dead'
                    }]
                ],
                plugins: [
                    '@babel/plugin-syntax-dynamic-import',
                    ['@babel/plugin-transform-runtime', {
                        useESModules: true
                    }]
                ]
            }),

@rollup/plugin-babel

Seamless integration between Rollup and Babel.

MIT
Latest version published 1 year ago

Package Health Score

93 / 100
Full package analysis

Popular @rollup/plugin-babel functions