UNPKG

@regru/webpack-babel-multi-target-plugin

Version:

A Webpack plugin that works with Babel to allow deployment of ES2015 builds targeted to modern browsers, with an ES5 fallback for legacy browsers.

44 lines 1.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_BABEL_PRESET_OPTIONS = { modules: false, useBuiltIns: 'usage', }; exports.DEFAULT_BABEL_PLUGINS = [ '@babel/plugin-syntax-dynamic-import', '@babel/plugin-transform-runtime', ]; exports.DEFAULT_MODERN_BROWSERS = [ // The last two versions of each browser, excluding versions // that don't support <script type="module">. 'last 2 Chrome versions', 'not Chrome < 60', 'last 2 Safari versions', 'not Safari < 10.1', 'last 2 iOS versions', 'not iOS < 10.3', 'last 2 Firefox versions', 'not Firefox < 54', 'last 2 Edge versions', 'not Edge < 15', ]; exports.DEFAULT_LEGACY_BROWSERS = [ '> 1%', 'last 2 versions', 'Firefox ESR', 'IE 11', ]; exports.DEFAULT_BROWSERS = { modern: exports.DEFAULT_MODERN_BROWSERS, legacy: exports.DEFAULT_LEGACY_BROWSERS, }; exports.DEFAULT_TARGET_INFO = { modern: { tagAssetsWithKey: true, browsers: exports.DEFAULT_MODERN_BROWSERS, esModule: true, noModule: false, }, legacy: { tagAssetsWithKey: false, browsers: exports.DEFAULT_LEGACY_BROWSERS, esModule: false, noModule: true, }, }; //# sourceMappingURL=defaults.js.map