Skip to content

Commit f4b3061

Browse files
authored
Fix build: Make tailwind config esm compatible, run prettier. (#477)
* Make tailwind config esm compatible * Run pnpm run format
1 parent 36913a4 commit f4b3061

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

.changeset/dirty-hotels-press.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Added configurable network exposure for Docker deployments with secure defaults.
99
- Optional network exposure via HOST_BIND environment variable
1010
- Configured port 2150 mapping for Docker container
1111

12-
Users can optionally expose their Srcbook instance to other network devices by setting HOST_BIND=0.0.0.0 when running Docker.
12+
Users can optionally expose their Srcbook instance to other network devices by setting HOST_BIND=0.0.0.0 when running Docker.

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
context: .
66
dockerfile: Dockerfile
77
ports:
8-
- "${HOST_BIND:-127.0.0.1}:2150:2150"
8+
- '${HOST_BIND:-127.0.0.1}:2150:2150'
99
volumes:
1010
- type: bind
1111
source: ~/.srcbook
@@ -16,4 +16,4 @@ services:
1616
- NODE_ENV=production
1717
- HOST=${HOST_BIND:-127.0.0.1}
1818
- SRCBOOK_INSTALL_DEPS=true
19-
command: ["pnpm", "start"]
19+
command: ['pnpm', 'start']

packages/web/tailwind.config.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
/** @type {import('tailwindcss').Config} */
2-
const plugin = require('tailwindcss/plugin');
3-
const path = require('path');
2+
import plugin from 'tailwindcss/plugin';
3+
import path from 'path';
4+
import { createRequire } from 'module';
5+
import animate from 'tailwindcss-animate';
46

5-
module.exports = {
7+
// Create require function for resolving package paths
8+
const require = createRequire(import.meta.url);
9+
10+
export default {
611
darkMode: ['class'],
712
content: [
813
'./index.html',
@@ -219,5 +224,5 @@ module.exports = {
219224
},
220225
},
221226
},
222-
plugins: [require('tailwindcss-animate')],
227+
plugins: [animate],
223228
};

0 commit comments

Comments
 (0)