scottcharlesworth / laravel-mix-polyfill

A Laravel Mix extension to include polyfills by using Babel, core-js, and regenerator-runtime
MIT License
50 stars 7 forks source link

TypeError: mix.extend is not a function #26

Closed Dev-El-badry closed 4 years ago

Dev-El-badry commented 4 years ago

mix.extend('polyfill', new Polyfill());

show error when command run " npm run watch "

webpack.mix.js :

let mix = require('laravel-mix'); require('laravel-mix-polyfill');

mix.js('resources/assets/js/app.js', 'public/js') .sass('resources/assets/sass/app.scss', 'public/css') .polyfill({ enabled: true, useBuiltIns: "usage", targets: {"firefox": "50", "ie": 11} });

scottcharlesworth commented 4 years ago

@Dev-El-badry what version of Laravel Mix are you using?

Dev-El-badry commented 4 years ago
"devDependencies": {
    "axios": "^0.17",
    "cross-env": "^5.1",
    "jquery": "^3.5.1",
    "laravel-mix": "^1.0",
    "lodash": "^4.17.4",
    "vue": "^2.5.7"
},
Dev-El-badry commented 4 years ago

SOLVED !! Update my version laravel-mix to the latest version and it SOLVED