1.0.0 • Published 6 years ago

runtime-compress-loader v1.0.0

Weekly downloads
46
License
MIT
Repository
-
Last release
6 years ago

runtime-compress-loader


Remove the helpers, babel and typescript inlined to the every file

What it does

Finds babel and typescript helpers and replaces them by code from @babel/runtime and tslib

It's usually a kilobyte in every file you have a class inside.

Usage

Just add this webpack loader before any other for node_modules, and after any other for other locations.

For project files

{
    test: /\.js$/,
    exclude: /node_modules/,
    loaders: ['runtime-compress-loader', 'babel-loader'],  
}

For node modules

{
    test: /\.js$/,
    include: /node_modules/,
    loaders: ['runtime-compress-loader'],  
}

For any location

{
    test: /\.js$/,
    loaders: ['runtime-compress-loader', 'babel-loader', 'runtime-compress-loader'],  
}

Other ways

Licence

MIT