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

Q: Plugin Location #603

Open
hinogi opened this issue Jan 16, 2024 · 2 comments
Open

Q: Plugin Location #603

hinogi opened this issue Jan 16, 2024 · 2 comments

Comments

@hinogi
Copy link

hinogi commented Jan 16, 2024

I see that the plugin string for tsconfig is an url. Does that mean you can only use the plugin if you also have access to the internet? or is there a npm package where to use it from?

@dsherret
Copy link
Member

dsherret commented Jan 16, 2024

You need access to the internet to download the wasm file (similar to how initially downloading an npm package needs the internet) and then it's cached after that. One possibility is to to download the wasm files, include them in the repo, then reference it via a relative path. Alternatively, you can include the @dprint/typescript npm dependency then reference the plugin.wasm file as a relative path found in the package: https://www.npmjs.com/package/@dprint/typescript?activeTab=code (ex. ./node_modules/@dprint/typescript/plugin.wasm)

Note that because the plugins are .wasm files they run sandboxed in a Wasm runtime with no access to outside resources.

@hinogi
Copy link
Author

hinogi commented Jan 16, 2024

ok so I can just adjust the path to the node_modules path.

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