
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@graphitation/embedded-document-artefact-loader
Advanced tools
This is a simple set of webpack/jest loaders that will replace embedded GraphQL documents with an import of an external compiled artefact file. It is meant to remain agnostic of a specific AST form, so it can work with pipelines that use babel, tsc, esbui
This is a simple set of webpack/jest loaders that will replace embedded GraphQL documents with an import of an external compiled artefact file. It is meant to remain agnostic of a specific AST form, so it can work with pipelines that use babel, tsc, esbuild, swc, etc.
It works for @graphitation/apollo-react-relay-duct-tape
and react-relay
.
const webpackConfig = {
module: {
rules: [
{
test: /.+?\.tsx?$/,
exclude: /node_modules/,
use: [
{
loader: "@graphitation/embedded-document-artefact-loader/webpack",
},
],
},
],
},
};
If you are using the artifactDirectory
option in your relay config you will need to direct the loader to the same folder.
const webpackConfig = {
module: {
rules: [
{
test: /.+?\.tsx?$/,
exclude: /node_modules/,
use: [
{
loader: "@graphitation/embedded-document-artefact-loader/webpack",
options: {
artifactDirectory: "path/to/your/artifact/directory",
},
},
],
},
],
},
};
The jest loader wraps ts-jest because there's no built-in way to chain loaders. The host still needs to provide ts-jest on their own.
const jestConfig = {
transform: {
"^.+\\.tsx?$": "@graphitation/embedded-document-artefact-loader/ts-jest",
},
};
If you are using the artifactDirectory
option in your relay config you will need to direct the loader to the same folder.
const jestConfig = {
transform: {
"^.+\\.tsx?$": [
"@graphitation/embedded-document-artefact-loader/ts-jest",
{
artifactDirectory: "path/to/your/artifact/directory",
},
],
},
};
FAQs
This is a simple set of webpack/jest loaders that will replace embedded GraphQL documents with an import of an external compiled artefact file. It is meant to remain agnostic of a specific AST form, so it can work with pipelines that use babel, tsc, esbui
We found that @graphitation/embedded-document-artefact-loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.