refactor(bundle): dont use ts for creating es2015 code
This commit is contained in:
@@ -6,6 +6,7 @@ import bundleSize from 'rollup-plugin-bundle-size';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import svgr from '@svgr/rollup';
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
import { DEFAULT_EXTENSIONS as DEFAULT_BABEL_EXTENSIONS } from '@babel/core';
|
||||
|
||||
import pkg from './package.json';
|
||||
|
||||
@@ -46,10 +47,6 @@ export const baseConfig = ({ mainFile = pkg.main, moduleFile = pkg.module, injec
|
||||
minimize: isProd,
|
||||
inject: injectCSS,
|
||||
}),
|
||||
babel({
|
||||
exclude: 'node_modules/**',
|
||||
babelHelpers: 'runtime',
|
||||
}),
|
||||
svgr(),
|
||||
resolve(),
|
||||
typescript({
|
||||
@@ -58,6 +55,11 @@ export const baseConfig = ({ mainFile = pkg.main, moduleFile = pkg.module, injec
|
||||
commonjs({
|
||||
include: 'node_modules/**',
|
||||
}),
|
||||
babel({
|
||||
extensions: [...DEFAULT_BABEL_EXTENSIONS, '.ts', '.tsx'],
|
||||
exclude: 'node_modules/**',
|
||||
babelHelpers: 'runtime',
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"module": "esnext",
|
||||
"target": "es5",
|
||||
"lib": ["es6", "dom", "es2016", "es2017"],
|
||||
"target": "esnext",
|
||||
"lib": ["dom", "esnext"],
|
||||
"jsx": "react",
|
||||
"moduleResolution": "node",
|
||||
"declaration": true,
|
||||
|
||||
Reference in New Issue
Block a user