Giter Site home page Giter Site logo

fmr's People

Contributors

arnosaine avatar blaisebaileyfinnegan avatar dependabot[bot] avatar elwayman02 avatar ianmstew avatar ilkkao avatar jbach avatar jedibatman avatar ksmithbaylor avatar lorem--ipsum avatar marcelkalveram avatar mcampa avatar nfour avatar paranoidjk avatar reves avatar scriptedalchemy avatar sebastianseilund avatar statianzo avatar vomchik avatar wbern avatar web-mi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jeasonnow

fmr's Issues

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

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

Webpack is not getting compiled with node version < 14

I tried to configure fmr on node version > 14 it is working fine

but i want to make it work on node version 12 but webpack is not getting complied

/node_modules/@module-federation/fmr/src/server/sockets/modules/useSocketMessage.js:36
      data: data ?? undefined,
                  ^

SyntaxError: Unexpected token '?'
    at new Script (vm.js:88:7)
    at NativeCompileCache._moduleCompile (/Users/chetanverma/phable/phable.doctor.frontend.rx/ams-appointment/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/Users/chetanverma/phable/phable.doctor.frontend.rx/ams-appointment/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (/Users/chetanverma/phable/phable.doctor.frontend.rx/ams-appointment/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/Users/chetanverma/phable/phable.doctor.frontend.rx/ams-appointment/node_modules/@module-federation/fmr/src/server/sockets/handlers/index.js:4:30)
    at Module._compile (/Users/chetanverma/phable/phable.doctor.frontend.rx/ams-appointment/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)

Some code contains es2020 , which is not support by node 12

I tried things but not able resolve it , if you guys know how i can do that it will be great help @ScriptedAlchemy

Conflicts with mini-css-extract-plugin

hi, Testing this library i found problems with mini-css-extract-plugin, is there a way to solve this ?

ERROR in ./src/assets/index.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
HookWebpackError: window is not defined
    at tryRunOrWebpackError (/home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/HookWebpackError.js:88:9)
    at __webpack_require_module__ (/home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/Compilation.js:4979:12)
    at /home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/Compilation.js:5003:11
    at symbolIterator (/home/carlos/htdocs/plitzi-sdk/node_modules/neo-async/async.js:3485:9)
    at timesSync (/home/carlos/htdocs/plitzi-sdk/node_modules/neo-async/async.js:2297:7)
    at Object.eachLimit (/home/carlos/htdocs/plitzi-sdk/node_modules/neo-async/async.js:3463:5)
    at /home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/Compilation.js:4879:16
    at symbolIterator (/home/carlos/htdocs/plitzi-sdk/node_modules/neo-async/async.js:3485:9)
    at done (/home/carlos/htdocs/plitzi-sdk/node_modules/neo-async/async.js:3527:9)
    at /home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/Compilation.js:4794:8
-- inner error --
ReferenceError: window is not defined
    at webpack/runtime/live reloading runtime module:2:1
    at /home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:460:11
    at Hook.eval [as call] (eval at create (/home/carlos/htdocs/plitzi-sdk/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:9:1)
    at /home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/Compilation.js:4981:39
    at tryRunOrWebpackError (/home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/HookWebpackError.js:83:7)
    at __webpack_require_module__ (/home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/Compilation.js:4979:12)
    at /home/carlos/htdocs/plitzi-sdk/node_modules/webpack/lib/Compilation.js:5003:11
    at symbolIterator (/home/carlos/htdocs/plitzi-sdk/node_modules/neo-async/async.js:3485:9)
    at timesSync (/home/carlos/htdocs/plitzi-sdk/node_modules/neo-async/async.js:2297:7)
    at Object.eachLimit (/home/carlos/htdocs/plitzi-sdk/node_modules/neo-async/async.js:3463:5)

Generated code for webpack/runtime/live reloading runtime module
 1 | 
 2 | if(!window.liveReload) {
 3 | window.liveReload = true
 4 | 	const socket = new WebSocket('ws://localhost:40001');
 5 | 	socket.addEventListener('open', function (event) {
 6 | 		console.log(`Client opened connection to server.`);
 7 | 	});
 8 | 
 9 | 	socket.addEventListener('message', function (event) {
10 | 		var message = JSON.parse(event.data);
11 | 		if (message.type === 'reload') {
12 | 			console.log('Reloading page due to reload event...');
13 | 			window.location.reload();
14 | 		}
15 | 	});
16 | 	socket.addEventListener('close', (event) => {
17 | 		console.log('Closing socket');
18 | 		socket.close();
19 | 	});
20 | 
21 | }
22 | 
 @ ./src/App.js 25:0-29
 @ ./WidgetEntryPointBootstrap.js 21:0-28 41:34-37 76:32-35
 @ container entry ./Sdk[0]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.