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

Explicit URL imports import the module when used with javascript files #16648

Open
7 tasks done
kallekankaanpaa opened this issue May 10, 2024 · 1 comment
Open
7 tasks done

Comments

@kallekankaanpaa
Copy link

Describe the bug

When trying to import the URL of a javascript file with the explicit URL import as described in the documentation the javascript module is imported rather than just the URL of the module.

This only happens when running the code with npm run dev the bundle built with npm run build works as expected.

Reproduction

https://stackblitz.com/edit/vitejs-vite-ubhupq?file=main.js

Steps to reproduce

  1. npm install
  2. npm run dev

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Memory: 2.81 GB / 7.62 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.5.2 - ~/.nvm/versions/node/v20.12.2/bin/npm

Used Package Manager

npm

Logs

No response

Validations

Copy link

stackblitz bot commented May 10, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

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

No branches or pull requests

1 participant