Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I try to add MFLiveReloadPlugin to vue.config.js. ( ERROR SyntaxError: Unexpected token '?') error #5

Open
Shin-Beomchul opened this issue Mar 24, 2022 · 3 comments

Comments

@Shin-Beomchul
Copy link

Shin-Beomchul commented Mar 24, 2022

I get an error when I try to add MFLiveReloadPlugin to vue.config.js.
Maybe it's a babel problem, but I can't find the exact cause.
Help. I've been up all night for a few days...

Step 1. add Dependency

  • npm i -D @module-federation/fmr

Step 2. add vue.config.js MFLiveReloadPlugin

  • const { MFLiveReloadPlugin } = require("@module-federation/fmr"); <---!! error cause !!

Step 3. yarn build or yarn serve ..

  • error !
  • log:: yarn build then,
 ERROR  SyntaxError: Unexpected token '?'
/Users/god/dev/pilot/web/mono-vue3-module-federation/components/comm-components/node_modules/@module-federation/fmr/src/server/sockets/modules/useSocketMessage.js:36
      data: data ?? undefined,
                  ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:931:16)
    at Module._compile (internal/modules/cjs/loader.js:979:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/Users/god/dev/pilot/web/mono-vue3-module-federation/components/comm-components/node_modules/@module-federation/fmr/src/server/sockets/handlers/index.js:4:30)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)

Code : https://github.com/Shin-Beomchul/mono-vue3-module-federation/blob/master/components/comm-components/vue.config.js

@ScriptedAlchemy
Copy link
Member

Send a pr

@radadiyasmit5
Copy link

is there any update on this issue ??

@ScriptedAlchemy
Copy link
Member

Will be shipping real hmr support this quarter I think. Use module federation/ enhanced or check on federation/universe repo for status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants