cadence-webpack-plugin
v1.0.1
Published
Webpack plugin that helps importing .cdc files
Downloads
4
Readme
cadence-webpack-plugin
Webpack plugin that helps importing .cdc files and polyfills fcl dependencies
This fixes the Buffer is not defined and Module not found: Error: Can't resolve 'http' bugs
Install
npm i cadence-webpack-plugin -D
Usage
import MINT_NFT from './flow/mint-nft.cdc'
await mutate({
cadence: MINT_NFT,
// ...
});
Setup with Webpack
In your webpack.config.js
const CadencePlugin = require('cadence-webpack-plugin')
module.exports = {
// ...
plugins: [
new CadencePlugin(),
// ...
]
}
Shortcut setup with Nullstack
In your webpack.config.js
const [server, client] = require('nullstack/webpack.config');
const { applyCadencePlugin } = require('cadence-webpack-plugin')
module.exports = applyCadencePlugin([server, client])
License
This project is released under the MIT License.