plugin-change-flags icon indicating copy to clipboard operation
plugin-change-flags copied to clipboard

You may need an appropriate loader to handle this file type.

Open wkasem opened this issue 5 years ago • 7 comments

./node_modules/@vuex-orm/plugin-change-flags/dist/index.js Module parse failed: Unexpected token (59:30) You may need an appropriate loader to handle this file type. | install(e, t) { | const n = { | ...r, | ...t | },

wkasem avatar Mar 06 '19 02:03 wkasem

Hello @wkasem,

How do you load the plugin and Vue / Vuex / VuexORM currently?

tvillaren avatar Mar 06 '19 08:03 tvillaren

using laravel mix and with this babelrc conf

{
  "presets": ["es2015", "stage-0"],
  "plugins": [
    "transform-class-properties",
    "transform-object-rest-spread",
    "transform-async-to-generator",
    "syntax-dynamic-import"
  ]
}

wkasem avatar Mar 06 '19 11:03 wkasem

From what I read on the Vuex ORM issue board, you might want to add "stage-2" in the presets: https://github.com/vuex-orm/vuex-orm/issues/220

Other solution is to build the change-flag plugin with this option to convert to standard JS (or completely remove from the plugin).

tvillaren avatar Mar 06 '19 12:03 tvillaren

@wkasem Any update on your issue?

tvillaren avatar Mar 20 '19 15:03 tvillaren

@tvillaren no i haven't figured it out yet , i have tried , stage-2 preset and tried to remove all presets , everything else is compiled successfully but this plugin !!

wkasem avatar Mar 24 '19 12:03 wkasem

I have the same problem, this plugin breaks edge compatibility.

SCRIPT1028: Expected identifier, string or number (in the dist file spread operator is used)

jasir avatar Nov 21 '19 11:11 jasir

Hmmm, I didn't know edge didn't support spread operator. Maybe we need polyfill for this?

We might need to refresh the build system to match other plugins such as Search and Axios and it might go away. Maybe I'll try this but if anyone has time to do it, more than welcome!

kiaking avatar Nov 27 '19 09:11 kiaking