Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flow-cadence-plugin

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flow-cadence-plugin

Webpack plugin for Cadence and Flow.

  • 0.0.6
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
0
Weekly downloads
 
Created
Source

Webpack Plugin for Cadence Files on the Flow Blockchain

This plugin allows you to import .cdc Cadence files directly into your project, making Flow blockchain scripts and transactions easily accessible in a Webpack-based setup. Additionally, it resolves any TypeScript type errors for .cdc imports, providing smooth integration with TypeScript projects. Let me know if you’d like further adjustments!

Usage

import ReadHelloWorld from '../cadence/scripts/ReadHelloWorld.cdc'

await fcl.query({
  cadence: ReadHelloWorld
})

Adding the Plugin

Install

npm install flow-cadence-plugin --save-dev

Webpack

To import .cdc files, add the plugin to your Webpack configuration:

new FlowCadencePlugin()

Next.js

To use the plugin in a Next.js project, add it to the Webpack configuration in next.config.js:

import FlowCadencePlugin from 'flow-cadence-plugin'

module.exports = {
  webpack: (config) => {
    config.plugins.push(new FlowCadencePlugin())
    return config
  },
}

Keywords

FAQs

Package last updated on 07 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc