utopia-ui/rollup.config.js
Anton Tranelis 9e6bcf1846
fix(source): update tailwind and daisyui (#196)
* removed daisy from config

* removed tw-elements artefact

* removed comments from tailwind config

* removed safelist

* migrated to tailwind4 and daisyui5

* deleted tailwind.config.js which is not eeded anymore

* 3.0.79

* version number

* fixed broken layouts

* more fixing

* more layout fixing

* tested theming

* small fixes

* adapt snapshots to changes

* package.json: add unit test update script

* more ui refactoring & theme controller

* ui improvements

* package-lock.json

* fix linting

* fixed tabs

* fix linting

* fixed typing

---------

Co-authored-by: mahula <lenzmath@posteo.de>
2025-04-25 16:03:42 +02:00

95 lines
2.3 KiB
JavaScript

import path from 'path'
import { fileURLToPath } from 'url'
import alias from '@rollup/plugin-alias'
import resolve from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'
import { dts } from 'rollup-plugin-dts'
import postcss from 'rollup-plugin-postcss'
import svg from 'rollup-plugin-svg'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const aliasConfig = alias({
entries: [{ find: '#types', replacement: path.resolve(__dirname, 'src/types') }],
})
export default [
{
input: 'src/index.tsx',
output: [
{
file: 'dist/index.esm.js',
format: 'esm',
sourcemap: true,
},
{
file: 'dist/index.cjs',
format: 'cjs',
sourcemap: true,
},
],
plugins: [
aliasConfig,
resolve({
extensions: ['.ts', '.tsx'],
}),
postcss({
plugins: [],
}),
typescript({
tsconfig: './tsconfig.json',
noEmitOnError: true,
}),
svg({ base64: true }),
],
external: [
'react',
'react-dom',
'react-markdown',
'react/jsx-runtime',
'remark-breaks',
'leaflet',
'react-leaflet',
'react-toastify',
'react-string-replace',
'react-toastify/dist/ReactToastify.css',
'react-router-dom',
'react-leaflet-cluster',
'@tanstack/react-query',
'prop-types',
'leaflet/dist/leaflet.css',
'@heroicons/react/20/solid',
'@heroicons/react/24/outline/ChevronRightIcon',
'@heroicons/react/24/outline',
'date-fns',
'@heroicons/react/24/outline/InformationCircleIcon',
'@heroicons/react/24/outline/QuestionMarkCircleIcon',
'@heroicons/react/24/outline/ChevronDownIcon',
'axios',
'react-image-crop',
'react-image-crop/dist/ReactCrop.css',
'react-colorful',
'leaflet.locatecontrol/dist/L.Control.Locate.css',
'yet-another-react-lightbox',
'react-photo-album',
'react-inlinesvg',
],
},
{
input: 'dist/types/src/index.d.ts',
output: [{ file: 'dist/index.d.ts', format: 'es' }],
plugins: [
aliasConfig,
dts({
compilerOptions: {
skipLibCheck: true,
},
}),
],
external: [/\.css$/], //, /\.d\.ts$/
watch: false,
},
]