Skip to content

Commit

Permalink
""
Browse files Browse the repository at this point in the history
  • Loading branch information
ouweiya committed Sep 26, 2023
1 parent 02cb0f6 commit 0ce302b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ class One extends LitElement {
Suggest using [`@rollup/plugin-alias`](https://github.com/rollup/plugins/tree/master/packages/alias#readme) to shorten import paths.

```js
plugins: [alias({ entries: [{ find: 'index.css', replacement: 'File path' }] }), ...];
import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'node:path';

const __filename = fileURLToPath(import.meta.url);
const cssPath = resolve(dirname(__filename), 'src/index.css'); // Absolute path

plugins: [alias({ entries: [{ find: 'index.css', replacement: 'cssPath' }] }), ...];
```
#### Compile inline CSS
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rollup-plugin-tailwindcss-lit",
"version": "1.1.8",
"version": "1.1.9",
"description": "Rollup plugin to use Tailwind CSS in Lit.",
"type": "module",
"main": "./dist/index.js",
Expand Down

0 comments on commit 0ce302b

Please sign in to comment.