3.0.4 • Published 1 month ago

@tinkoff/is-modern-lib v3.0.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month 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'],
          },
        },
      },
    ],
  },
};
3.0.4

1 month ago

4.0.1

1 month ago

3.0.3

3 months ago

2.0.15

7 months ago

2.0.16

7 months ago

2.0.13

8 months ago

2.0.14

7 months ago

2.0.11

9 months ago

2.0.12

8 months ago

2.0.10

10 months ago

3.0.2

5 months ago

3.0.1

6 months ago

3.0.0

6 months ago

2.0.17

6 months ago

2.0.9

11 months ago

2.0.7

1 year ago

2.0.8

1 year ago

2.0.5

1 year ago

2.0.6

1 year ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

1.2.12

2 years ago

1.2.13

2 years ago

1.2.11

2 years ago

1.2.10

2 years ago

1.2.9

3 years ago

1.2.8

3 years ago