thrift-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

thrift-webpack-plugin

generate code from thrift files before webpack compiling after you changed you thrift.

Getting Started

$ npm install thrift-webpack-plugin --save-dev

Example

in webpack.config.js

const ThriftPlugin = require('thrift-webpack-plugin');

module.exports = {
  // ...
  plugins: [
    new ThriftPlugin({
      thrift: path.join(__dirname, './src'),
      output: path.join(__dirname, './node_modules/.thrift'),
      target: 'library'
    })
  ]
};

You can use import * as apis from '.thrift'; in your code.

License

ISC

Readme

Keywords

Package Sidebar

Install

npm i thrift-webpack-plugin

Weekly Downloads

2

Version

0.1.2

License

ISC

Unpacked Size

34 kB

Total Files

21

Last publish

Collaborators

  • dylannil