Skip to content

Commit c6737e2

Browse files
committed
fix(imports): add .js extension
Closes #8
1 parent 9d85eee commit c6737e2

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ npm install @epic-web/client-hints
3636

3737
## The Problem
3838

39-
Sometimes your server rendered code needs to know something about the client that
40-
the browser doesn't send. For example, the server might need to know the user's
41-
preferred language, or whether the user prefers light or dark mode.
39+
Sometimes your server rendered code needs to know something about the client
40+
that the browser doesn't send. For example, the server might need to know the
41+
user's preferred language, or whether the user prefers light or dark mode.
4242

4343
For some of this you should have user preferences which can be persisted in a
4444
cookie or a database, but you can't do this for first-time visitors. All you can

src/color-scheme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ClientHint } from './utils'
1+
import { type ClientHint } from './utils.js'
22

33
export const clientHint = {
44
cookieName: 'CH-prefers-color-scheme',

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ClientHint, ClientHintsValue } from './utils'
1+
import { ClientHint, ClientHintsValue } from './utils.js'
22

33
export type { ClientHint }
44

src/reduced-motion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ClientHint } from './utils'
1+
import { type ClientHint } from './utils.js'
22

33
export const clientHint = {
44
cookieName: 'CH-reduced-motion',

src/time-zone.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ClientHint } from './utils'
1+
import { type ClientHint } from './utils.js'
22

33
export const clientHint = {
44
cookieName: 'CH-time-zone',

test/index.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { test } from 'node:test'
2-
import { getHintUtils } from '../src'
3-
import { clientHint as colorSchemeHint } from '../src/color-scheme'
4-
import { clientHint as timeZoneHint } from '../src/time-zone'
5-
import { clientHint as reducedMotionHint } from '../src/reduced-motion'
2+
import { getHintUtils } from '../src/index.js'
3+
import { clientHint as colorSchemeHint } from '../src/color-scheme.js'
4+
import { clientHint as timeZoneHint } from '../src/time-zone.js'
5+
import { clientHint as reducedMotionHint } from '../src/reduced-motion.js'
66
import assert from 'node:assert'
77

88
test('client script works', () => {

0 commit comments

Comments
 (0)