plugin-change-flags
plugin-change-flags copied to clipboard
You may need an appropriate loader to handle this file type.
./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 | },
Hello @wkasem,
How do you load the plugin and Vue / Vuex / VuexORM currently?
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"
]
}
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).
@wkasem Any update on your issue?
@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 !!
I have the same problem, this plugin breaks edge compatibility.
SCRIPT1028: Expected identifier, string or number
(in the dist file spread operator is used)
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!