fix(build): remove babel require statements from build
This commit is contained in:
Generated
+11559
-10
File diff suppressed because it is too large
Load Diff
+6
-6
@@ -1,6 +1,6 @@
|
|||||||
import resolve from '@rollup/plugin-node-resolve';
|
import resolve from '@rollup/plugin-node-resolve';
|
||||||
import commonjs from '@rollup/plugin-commonjs';
|
import commonjs from '@rollup/plugin-commonjs';
|
||||||
import babel from '@rollup/plugin-babel';
|
// import babel from '@rollup/plugin-babel';
|
||||||
import postcss from 'rollup-plugin-postcss';
|
import postcss from 'rollup-plugin-postcss';
|
||||||
import bundleSize from 'rollup-plugin-bundle-size';
|
import bundleSize from 'rollup-plugin-bundle-size';
|
||||||
import replace from '@rollup/plugin-replace';
|
import replace from '@rollup/plugin-replace';
|
||||||
@@ -15,7 +15,7 @@ const processEnv = isProd || isTesting ? 'production' : 'development';
|
|||||||
|
|
||||||
export const baseConfig = ({ mainFile = pkg.main, moduleFile = pkg.module, injectCSS = true } = {}) => ({
|
export const baseConfig = ({ mainFile = pkg.main, moduleFile = pkg.module, injectCSS = true } = {}) => ({
|
||||||
input: 'src/index.ts',
|
input: 'src/index.ts',
|
||||||
external: ['react', 'react-dom', /@babel\/runtime/],
|
external: ['react', 'react-dom'],
|
||||||
onwarn(warning, rollupWarn) {
|
onwarn(warning, rollupWarn) {
|
||||||
if (warning.code !== 'CIRCULAR_DEPENDENCY') {
|
if (warning.code !== 'CIRCULAR_DEPENDENCY') {
|
||||||
rollupWarn(warning);
|
rollupWarn(warning);
|
||||||
@@ -48,10 +48,10 @@ export const baseConfig = ({ mainFile = pkg.main, moduleFile = pkg.module, injec
|
|||||||
minimize: isProd,
|
minimize: isProd,
|
||||||
inject: injectCSS,
|
inject: injectCSS,
|
||||||
}),
|
}),
|
||||||
babel({
|
// babel({
|
||||||
exclude: 'node_modules/**',
|
// exclude: 'node_modules/**',
|
||||||
babelHelpers: 'runtime',
|
// babelHelpers: 'runtime',
|
||||||
}),
|
// }),
|
||||||
svgr(),
|
svgr(),
|
||||||
typescript({
|
typescript({
|
||||||
clean: true,
|
clean: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user