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

question about packages/dev-server-import-maps #2763

Open
chriswang- opened this issue Jul 1, 2024 · 3 comments
Open

question about packages/dev-server-import-maps #2763

chriswang- opened this issue Jul 1, 2024 · 3 comments

Comments

@chriswang-
Copy link

chriswang- commented Jul 1, 2024

I can not understand about this plugin's purpose, But strangely, when I used web-dev-server, my native HTML importmap function completely disappeared, so I was forced to install this plugin, and it worked, but when I opened the source code of the webpage, I was surprised to find below:
import { render } from 'https://ga.jspm.io/npm:[email protected]/index.js?wds-import-map=0';

It is wrong, it should be: " import { render } from 'lit1'"
I think my source code has been change with a wrong way by the plugin....

Could someone tell me what is might cause the problem , i just want the original HTML importmap funciton to work
`

<script type="importmap">   {   "imports": {   "lit1": "https://ga.jspm.io/npm:[email protected]/index.js"      },   }   } </script>    <script type="module">

  import { render } from 'https://ga.jspm.io/npm:[email protected]/index.js?wds-import-map=0';
 
  </script>

`

@bashmish
Copy link
Member

bashmish commented Jul 2, 2024

I got an email notification with a suggestion to close this issue, but don't see anything in here. You can close it yourself as well if you figured how to solve it.

if not, please provide a repository with minimal reproduction of this and simple steps to run and see this behavior.

@chriswang-
Copy link
Author

importmap-test.zip
This is the simplest code, importmap does not work

@chriswang-
Copy link
Author

@bashmish Why does web-dev-server block the configuration of HTML importmap and make it not work? In addition, you provide the plugin dev-server-import-maps, and the processing mechanism of this plugin is also problematic, so I would like to ask, how can I make HTML importmap work properly?

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

2 participants