0.0.2 • Published 5 years ago
teakit-webpack-plugin v0.0.2
teakit-webpack-plugin
Create smaller Lodash builds by replacing of modules
Install
$ npm i --save teakit
$ npm i --save-dev teakit-webpack-plugin babel-core babel-loader babel-plugin-teakit babel-preset-env webpack
Usage
webpack.config.js
var TeakitModuleReplacementPlugin = require('teakit-webpack-plugin');
var webpack = require('webpack');
module.exports = {
'module': {
'rules': [{
'use': 'babel-loader',
'test': /\.js$/,
'exclude': /node_modules/,
'options': {
'plugins': ['teakit'],
'presets': [['env', { 'modules': false, 'targets': { 'node': 4 } }]]
}
}]
},
'plugins': [
new TeakitModuleReplacementPlugin,
new webpack.optimize.UglifyJsPlugin
]
};
Opt-in to features with an options object:
new TeakitModuleReplacementPlugin({
'collections': true,
'paths': true
});