fix: build tailwind with rollup in TS (#44713)

* fix: build tailwind with rollup in TS

* Update tools/ui-components/package.json

Co-authored-by: ahmad abdolsaheb <home@mac-16.local>
This commit is contained in:
Ahmad Abdolsaheb
2022-01-13 16:59:03 +03:00
committed by GitHub
parent d53a457fc2
commit 8c5ac39dd2
4 changed files with 13 additions and 4 deletions

View File

@ -1,13 +1,14 @@
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import postcss from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';
import resolve from '@rollup/plugin-node-resolve';
const production = process.env.NODE_ENV !== 'development';
const config = {
input: 'src/index.js',
input: 'src/index.ts',
output: [
{
file: 'dist/bundle.js',
@ -25,8 +26,9 @@ const config = {
}
],
plugins: [
nodeResolve(),
postcss(),
resolve(),
typescript({ sourceMap: false }),
babel({ babelHelpers: 'bundled' }),
commonjs(),
production && terser()