runtime-compress-loader

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i runtime-compress-loader

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

20.5 kB

Total Files

5

Last publish

Collaborators

  • kashey