Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@procensus/relay-compiler-webpack-plugin
Advanced tools
Automatically run the Relay Compiler from Webpack
Are you running Relay Modern? Are you annoyed with constantly running the relay-compiler
to generate code, especially if you're already running Webpack?
Well be annoyed no more! Simply install this plugin to automatically hook into Webpack's build process to generate these files for you.
yarn add --dev relay-compiler-webpack-plugin
# Or if you're using npm
npm install --save-dev relay-compiler-webpack-plugin
const RelayCompilerWebpackPlugin = require('relay-compiler-webpack-plugin')
const path = require('path')
module.exports = {
// ... Your existing Webpack configuration
plugins: [
// ...
new RelayCompilerWebpackPlugin({
schema: path.resolve(__dirname, './relative/path/to/schema.graphql'), // or schema.json or a GraphQLSchema instance
src: path.resolve(__dirname, './relative/path/to/source/files'),
})
]
// ...
}
If there are multiple versions of GraphQL in your dependency tree it will cause schema validation errors. To get around this, ensure you have the same graphql version as your relay-compiler version depends on. To assist this you can install dependencies as flat which ensures only one version of each dependency.
Currently, the relay-compiler
is undergoing a lot of work.
Various modules required by this library aren't modular enough to truly inject the generated files into Webpack's file hierarchy.
We'll be working with the relay-compiler
to make it more modular in this regard as well as updating this project accordingly.
However it is still better than manually running the relay-compiler
whenever anything changes.
Currently Webpack may build a few times once it picks up the files generated by this plugin.
Relay Compiler Webpack Plugin may be redistributed according to the BSD 3-Clause License.
Copyright 2017
FAQs
Automatically run the Relay Compiler from Webpack
The npm package @procensus/relay-compiler-webpack-plugin receives a total of 2 weekly downloads. As such, @procensus/relay-compiler-webpack-plugin popularity was classified as not popular.
We found that @procensus/relay-compiler-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.