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

import JSON via ESM for the website is not bundling correctly on Windows #620

Closed
1 of 5 tasks
thescientist13 opened this issue May 31, 2021 · 0 comments · Fixed by #621
Closed
1 of 5 tasks

import JSON via ESM for the website is not bundling correctly on Windows #620

thescientist13 opened this issue May 31, 2021 · 0 comments · Fixed by #621
Assignees
Labels
bug Something isn't working CLI discussion tied to an ongoing discussion or meeting notes v0.12.4 website Tasks related to the projects website / documentation
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented May 31, 2021

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

It appears Rollup might have an issue handling import statements that include query strings? This is what I am seeing only on Windows after 0.12.3 release, that included a fix for #604 .

'C:UsersIEUserWorkspacegreenwoodwwwpackage.json' is imported by www\package.json?type=json, but could not be resolved – treating it as an external dependency

import-json-broken-windows-serve

Although the version is fine in the HTML, there is a console error due to a bundling issue.

⚠️ **Note: this should got resolved before / as part of #516 and #616 or anything coming out of #606 !! **

Details

Update:

Not sure what I was on about below but seems a simple enough solution per #621 😄

At first I thought it was only a Windows + [**@rollup/plugin-json**](https://github.com/rollup/plugins/tree/master/packages/json) specific issue given the nature of it, but in the s[ample repo I made](https://github.com/thescientist13/rollup-plugin-json-windows), it seems that any usage of Rollup + query strings is broken? ```js // these break import square from './square.js?foo=bar'; import json from './data.json?foo=bar'; ```

Rollup should handle, it per this comment and link to a repro? 🤔

@thescientist13 thescientist13 added bug Something isn't working CLI discussion tied to an ongoing discussion or meeting notes labels May 31, 2021
@thescientist13 thescientist13 added this to the 1.0 milestone May 31, 2021
@thescientist13 thescientist13 self-assigned this May 31, 2021
@thescientist13 thescientist13 added the website Tasks related to the projects website / documentation label May 31, 2021
@thescientist13 thescientist13 changed the title import JSON vis ESM is not bundling correctly on Windows import JSON via ESM for the website is not bundling correctly on Windows May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI discussion tied to an ongoing discussion or meeting notes v0.12.4 website Tasks related to the projects website / documentation
Projects
None yet
1 participant