Closed yehudahkay closed 5 years ago
seems you are missing the spread operator polyfill.
What do I need to do?
could you try to add to your dependencies:
"core-js": "^2.6.5",
If this works for you I will add it to the components dependcies.
No, I actually tried that before with version 3 now I tried with 2 as well
I got the exact same thing. Did you handle it?
Thanks.
I'm trying to reproduce this error without success for now. Are using this in the browser or in webpack project ?
Do you have .babelrc or babel.config.js in your projects with preset:
[ '@vue/app' ]
in it
I imagine it's related to webpack somehow. I am using laravel mix (a webpack wrapper) version 3
The solution for laravel mix (I used that before) is
npm install --save-dev babel-plugin-transform-object-rest-spread
and than create a .babelrc file in your project directory
{
"plugins": ["transform-object-rest-spread"]
}
I just want to make it work out of the box for all scenarios.
same problem here
.babelrc
{ "plugins": ["transform-object-rest-spread"], "presets": [["env", { "modules": false }], "stage-3"] }
please help how to fix it
@mwmasterweaks are you also using laravel mix ?
I have no idea about laravel mix but all I know is I use webpack
could you share you dependencies in package.json
I imagine it's related to webpack somehow. I am using laravel mix (a webpack wrapper) version 3
Same problem here, I'm using Laravel Mix too.
The solution for laravel mix (I used that before) is
npm install --save-dev babel-plugin-transform-object-rest-spread
and than create a .babelrc file in your project directory
{ "plugins": ["transform-object-rest-spread"] }
I just want to make it work out of the box for all scenarios.
I've tried that, but doesn't work...
Same thing here. I am using rails with webpack.
UPDATE
I went to file vue2-daterange-picker/src/components/util.js
and changed line 46 from
return {...default_locale, ...options }
to
return Object.assign({}, default_locale, options)
and BOOM the magic has happened.
Long story short this happens when es2015 is not loaded. Two ways to solve it
Hi, i'm using laravel-mix + webpack to transpile my files. My app.js
is broken on safari browser =< version 11. I've tried to change the line 46, like @kot-begemot suggested. I've tried to set @babel/env
, @vue/app
and others presets and plugins on .babelrc.
But doesn't work.
Has this beed addressed? It would suck to trans-pile to a low code base just for this one module on one crappy browser.
@DelfsEngineering I solved the problem by transpiling the files correctly. Safari version 11 is not that old and deserves some attention.
@DelfsEngineering I solved the problem by transpiling the files correctly. Safari version 11 is not that old and deserves some attention.
What Babel settings worked? I am not having a ton of luck. Thanks for the udpate.
In the last version I think I fixed the older browser problem by including the dist files. What version of the package are you using ?
@DelfsEngineering if you are using an older version you can add this to vue.config.js :
module.exports = {
transpileDependencies: [
'vue2-daterange-picker',
],
.....
Hi thanks this looks cool, i get the following issue in my build