You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
text
with contentI'm a text file.
assetsInclude
invite.config.js
:assetsInclude: ["text"],
import BinUrl from './text';
fetch
to retrieve its content:fetch(BinUrl).then(response => response.text()).then(text => document.querySelector('#app').innerHTML = text);
In dev mode, the result is
export default "/text"
In preview mode, the result is
I'm a text file.
(correct)Reproduction
https://stackblitz.com/edit/vitejs-vite-whfdz5?file=main.js
Steps to reproduce
npm install && npm run dev
System Info
System: OS: macOS 12.4 CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz Memory: 31.76 MB / 24.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.16.0 - /usr/local/opt/node@18/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.5.1 - /usr/local/opt/node@18/bin/npm Browsers: Chrome: 114.0.5735.133 Safari: 15.5 npmPackages: vite: ^4.3.9 => 4.3.9
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: