0.1.2 • Published 7 months ago

thrift-webpack-plugin v0.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

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

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago