chrome-extension-tools
chrome-extension-tools copied to clipboard
Files imported with ?raw not updating after changes
Build tool
Vite
Where do you see the problem?
- [X] In the browser
- [ ] In the terminal
Describe the bug
When you import a file with ?raw
approach (tested on .html and .txt files, likely reproducible on other file types too), they don't update in build folder after modifications. On v1 it works fine. Seems to be similar to #492
Reproduction
- Have this file structure: content-script.ts:
import testContent from './test.html?raw'
console.log(testContent)
test.html:
123
- Change test.html to contain
456
Expected: 456
in the console and the corresponding file in the build
folder right after changing.
Actual: 123
in the console and in the corresponding file in the build
folder until you restart the server (either with npm command rerun or "r" shortcut in the vite terminal)
Logs
No response
System Info
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-1240P
Memory: 1.58 GB / 15.63 GB
Binaries:
Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.21 - C:\Program Files\nodejs\yarn.CMD
npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.14.1 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (120.0.2210.133)
Internet Explorer: 11.0.22621.1
npmPackages:
@crxjs/vite-plugin: ^2.0.0-beta.19 => 2.0.0-beta.23
vite: ^4.4.11 => 4.5.1
Severity
annoyance