You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose that Parcel adds support for ECMAScript import assertions using the syntax. This feature would allow developers to import static assets (such as , , and other text-based files) directly as strings without relying on additional plugins or workarounds.with { type: 'text' }.txt.wgsl
For example, in Bun, we can import a file's content as text simply by using:
js
复制
编辑
import shaderSource from 'xxx/base.wgsl' with { type: 'text' };
This is a very useful feature that aligns with modern ES module capabilities and improves the developer experience by streamlining asset imports.
Benefits:
Standards Alignment: Supports the evolving ECMAScript import assertions proposal.
Improved Developer Experience: Simplifies the workflow by removing the need for custom plugins or query parameters.
Consistency Across Bundlers: Ensures a similar import experience when switching between bundlers like Bun and Parcel.
Enhanced Flexibility: Makes it easier to manage static assets like shaders, text files, or configuration files in a straightforward manner.
I believe this addition would benefit a large number of developers and further strengthen Parcel as a modern bundler.
Thank you for considering this request. I look forward to your feedback!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to propose that Parcel adds support for ECMAScript import assertions using the syntax. This feature would allow developers to import static assets (such as , , and other text-based files) directly as strings without relying on additional plugins or workarounds.with { type: 'text' }.txt.wgsl
For example, in Bun, we can import a file's content as text simply by using:
js
复制
编辑
import shaderSource from 'xxx/base.wgsl' with { type: 'text' };
This is a very useful feature that aligns with modern ES module capabilities and improves the developer experience by streamlining asset imports.
Benefits:
Standards Alignment: Supports the evolving ECMAScript import assertions proposal.
Improved Developer Experience: Simplifies the workflow by removing the need for custom plugins or query parameters.
Consistency Across Bundlers: Ensures a similar import experience when switching between bundlers like Bun and Parcel.
Enhanced Flexibility: Makes it easier to manage static assets like shaders, text files, or configuration files in a straightforward manner.
I believe this addition would benefit a large number of developers and further strengthen Parcel as a modern bundler.
Thank you for considering this request. I look forward to your feedback!
Beta Was this translation helpful? Give feedback.
All reactions