Package Exports
- laravel-mix-polyfill
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (laravel-mix-polyfill) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Laravel Mix Polyfill
A Laravel Mix extension for Babel Polyfill.
Usage
First, install the extension.
npm install laravel-mix-polyfill --save-devor
yarn add laravel-mix-polyfill --devThen, require it within your webpack.mix.js file:
let mix = require('laravel-mix');
require('laravel-mix-polyfill');
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.polyfill({
enabled: true,
useBuiltIns: "usage",
targets: {"firefox": "50", "ie": 11}
});Options
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | boolean |
true |
Should polyfill be used. |
| useBuiltIns | string |
"usage" |
See here and here for detailed description. |
| targets | string, object, boolean |
"defaults" |
Allows a target (browser) environment to be specified. This can either be: • a browserslist-compatible query ( "> 0.25%, not dead"), • an object of minimum environment versions to support ( {"chrome": "58", "ie": "11"}),• or false to transform all ECMAScript 2015+ code by default. • Setting to false will also allow use of browserslist config sources (like .browserslistrc). See here and here for more information. You can test string values on browserl.ist. |
| corejs | number |
2 |
The version of core-js to be used. |
| debug | boolean |
false |
Outputs the targets/plugins used to the console. |