Skip to content

Commit 12f09c0

Browse files
committed
fix url and improve readme
1 parent 5e28abc commit 12f09c0

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ Add it to your `nuxt.config.ts`:
3131
export default defineNuxtConfig({
3232
modules: [
3333
'nuxt-component-preview',
34-
],
35-
// Optionally configure here
36-
// componentPreview: { ... }
34+
]
3735
})
3836
```
3937

@@ -61,7 +59,7 @@ The app-loader script automatically sets up everything needed for component prev
6159
<html>
6260
<head>
6361
<title>Component Preview</title>
64-
<script src="/nuxt-component-preview/app-loader.js"></script>
62+
<script src="http://localhost:3000/nuxt-component-preview/app-loader.js"></script>
6563
</head>
6664
<body>
6765
<h1>Component Preview Page</h1>

test/basic.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('nuxt-component-preview module', async () => {
4949
const cdnURL = configMatch[1]
5050
expect(cdnURL).toBeTruthy()
5151
// Should be a valid URL with protocol and host
52-
expect(cdnURL).toMatch(/^https?:\/\/[^\/]+/)
52+
expect(cdnURL).toMatch(/^https?:\/\/[^/]+/)
5353
}
5454

5555
// Check that entry module src uses the same URL

test/preview-dev.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ describe('preview E2E (dev mode)', async () => {
7979
expect(componentContent.hasCardStructure).toBe(true)
8080
await page.close()
8181
})
82-
8382
})
8483

8584
describe('without app-loader.js (manual setup)', () => {

0 commit comments

Comments
 (0)