4.0.3 • Published 9 months ago

@tinkoff/is-modern-lib v4.0.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

@tinkoff/is-modern-lib

RegExp for check packages from node_modules that are distributed in ES2015+.

This RegExp might be used to determine modules which should be transpiled to ES5.

Usage

Based on example from the article Publish, ship, and install modern JavaScript

// webpack.config.js
const { modernLibsFilter } = require('@tinkoff/is-modern-lib');

module.exports = {
  module: {
    rules: [
      // Transpile for your own first-party code:
      {
        test: /\.[cm]?js$/i,
        loader: 'babel-loader',
        exclude: /node_modules/,
      },
      // Transpile modern dependencies:
      {
        test: /\.[cm]?js$/i,
        include: modernLibsFilter,
        use: {
          loader: 'babel-loader',
          options: {
            babelrc: false,
            configFile: false,
            presets: ['@babel/preset-env'],
          },
        },
      },
    ],
  },
};
4.0.3

9 months ago

5.0.2

10 months ago

3.0.4

1 year ago

4.0.1

1 year ago

3.0.3

1 year ago

2.0.15

2 years ago

2.0.16

2 years ago

2.0.13

2 years ago

2.0.14

2 years ago

2.0.11

2 years ago

2.0.12

2 years ago

2.0.10

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.17

2 years ago

2.0.9

2 years ago

2.0.7

2 years ago

2.0.8

2 years ago

2.0.5

3 years ago

2.0.6

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

1.2.12

3 years ago

1.2.13

3 years ago

1.2.11

3 years ago

1.2.10

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago