forked from vitejs/vite
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: @vite/client http request is 404 not found (vitejs#4187)
Co-authored-by: Shinigami <chrissi92@hotmail.de>
- Loading branch information
1 parent
fc525a0
commit e9bbb12
Showing
6 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
packages/playground/extensions/__tests__/extensions.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
test('should have no 404s', () => { | ||
browserLogs.forEach((msg) => { | ||
expect(msg).not.toMatch('404') | ||
}) | ||
}) | ||
|
||
test('not contain `.mjs`', async () => { | ||
let appHtml = await page.content() | ||
expect(appHtml).toMatch('Hello Vite!') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div id="app">Hello Vite!</div> | ||
|
||
<script type="module"> | ||
import { createApp } from 'vue' | ||
createApp({ template: 'Hello Vite!' }).mount('#app') | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "test-extensions", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"debug": "node --inspect-brk ../../vite/bin/vite", | ||
"serve": "vite preview" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.0.8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
resolve: { | ||
alias: [{ find: 'vue', replacement: 'vue/dist/vue.esm-bundler.js' }], | ||
extensions: ['.js'] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters