Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Shared React components of MLL

## Usage

Import the styles once in the entry point of your application:

```ts
import '@mll-lab/react-components/esm/index.css';
```

To set up proper styles, wrap your application in `<Provider>`:

```tsx
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ export default {
// https://rollupjs.org/configuration-options/#output-interop
// Necessary in order for jest in consumers to work
interop: 'auto',
assetFileNames: '[name][extname]',
},
{
file: pkg.module,
format: 'esm',
sourcemap: true,
assetFileNames: '[name][extname]',
},
],

Expand All @@ -47,6 +49,9 @@ export default {
exclude: '**/*.(test|stories).(ts|tsx)',
}),
styles({
mode: ['extract', 'index.css'],
// Keeps url('#linearGradient-1') of antd's Empty instead of emitting it as an asset
url: false,
less: {
javascriptEnabled: true,
},
Expand Down
Loading