Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files imported with ?raw not updating after changes #861

Open
1 of 2 tasks
dimadk24 opened this issue Jan 19, 2024 · 0 comments
Open
1 of 2 tasks

Files imported with ?raw not updating after changes #861

dimadk24 opened this issue Jan 19, 2024 · 0 comments

Comments

@dimadk24
Copy link

Build tool

Vite

Where do you see the problem?

  • 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

  1. Have this file structure:
    content-script.ts:
import testContent from './test.html?raw'

console.log(testContent)

test.html:

123
  1. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant