Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
webpack-grpc-web-loader
Advanced tools
A webpack loader to load .proto files for grpc-web with effortless setup.
👉 You don't have to install protoc or protoc-gen-grpc-web plugin in your environment, just use npm or yarn to install this webpack loader, and everything is done.
npm install --save-dev webpack-grpc-web-loader
Or
yarn add --dev webpack-grpc-web-loader
const path = require('path');
module.exports = {
module: {
rules: [
{
test: /\.proto$/,
use: [
{
loader: 'webpack-grpc-web-loader',
options: {
protoPath: path.resolve(__dirname, './src/protos'),
},
},
],
},
],
},
};
If you have multiple proto paths, you can pass an array to the option protoPath
:
{
loader: 'webpack-grpc-web-loader',
options: {
protoPath: [
path.resolve(__dirname, './src/my-protos-1'),
path.resolve(__dirname, './src/my-protos-2'),
],
},
}
import helloWorldProto from './hello-world.proto';
const client = new helloWorldProto.HelloWorldClient('http://localhost:11101/grpc');
const helloRequest = new helloWorldProto.HelloRequest();
client.helloWorld(helloRequest, {}, (err, res) => {
// handle error and response here
});
Option Name | Type | Required | Default Value | Description |
---|---|---|---|---|
protoPath | string | string[] | true | N/A | Same as --proto_path (-I ) in protoc |
FAQs
A webpack loader to load .proto files for grpc-web with effortless setup.
The npm package webpack-grpc-web-loader receives a total of 29 weekly downloads. As such, webpack-grpc-web-loader popularity was classified as not popular.
We found that webpack-grpc-web-loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.