thrift-webpack-plugin
v0.1.2
Published
generate code from thrift files before webpack compiling after you changed you thrift
Downloads
1
Readme
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.