hannoeru / esbuild-plugin-raw Goto Github PK
View Code? Open in Web Editor NEWesbuild plugin for raw import
License: MIT License
esbuild plugin for raw import
License: MIT License
I am using this plugin to load SVG files into my lib.
When I look at the generated files I can see comments like :
// raw-loader:B:\Projects\misc\esbuild-raw\icon.svg?raw
=> the plugin is outputing the full file path into the generated files. Beside being not very clean, I think it could lead to information leak (something something about system structure on a corporate computer).
I tried to replace this line
esbuild-plugin-raw/src/index.ts
Line 11 in 1698f08
path: args.path
and it seems to continue working without any issue and now the comment is simply
// raw-loader:./icon.svg?raw
I guess the path resolution is here to handle more complex cases, perhaps it could be done only in onLoad
https://github.com/mistic100/temp-esbuild-raw
Windows 10
yarn
I'm trying to import .tsx
content as raw text. There's no usage guide, so I'm not sure if this repo might be the answer. Thanks
0.1.7 doesn't list latest esbuilds as peer deps
release 0.1.8 :)
No response
No response
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates await pending status checks before automerging. Click on a checkbox to abort the branch automerge, and create a PR instead.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/ci.yaml
actions/checkout v4
actions/setup-node v4
actions/checkout v4
actions/setup-node v4
.github/workflows/release.yml
actions/checkout v4
actions/setup-node v4
example/package.json
typescript ^5.4.5
package.json
@hannoeru/eslint-config ^0.9.7
@types/node ^20.12.12
esbuild ^0.21.4
eslint ^9.3.0
tsup ^8.0.2
typescript ^5.4.5
esbuild ^0.14.36 || ^0.15.0 || ^0.16.0 || ^0.17.0 || ^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0
.nvmrc
node 20.13.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.