Git Product home page Git Product logo

fmr-issues's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

fmr-issues's Issues

Webpack is not specified as a peer dependency

Hi, thanks for your work ๐Ÿ˜ƒ

I use Lerna in a monorepo.
Some of my subpackages use webpack 4, some of my subpackages use webpack 5.

When Lerna installs (bootstraps) my subprojects it uses node module resolution to determine where to hoist packages depending on their dependencies.

Right now, the fmr package does not specify that it needs any particular webpack version to work, so gets hoisted up to v4 webpack sometimes.
This results in failure to compile and a stack trace like:
[webpack cli] TypeError: Class extends value undefined is not a constructor or null at Object.<anonymous> (node_modules/@module-federation/fmr/src/index.js:40:39)

The solution is to specify the correct webpack dependency as a "peerDependency" in your package.json
I have tested this and confirmed it works with

"peerDependencies": {
    "webpack": "~5.39"
}

Missing type definitions

Hi,

I have some webpack configurations in typescript.

The fmr package does not have its own type definition at the moment and there is no community package via DefinitelyTyped.
This means Typescript will throw with cannot find a declaration file for module '@module federation/fmr'.

On the consumer side this can be worked around by creating a local declaration file.

Will you create and maintain your own types or should we create the community version?

Occasionally seeing undefined error while accessing `readyState`

This is the stack trace when I see the error:

<e> [MFLiveReloadPlugin] TypeError: Cannot read property 'readyState' of undefined
<e>     at MFLiveReloadPlugin._afterEmit (C:\source\.yarn\cache\@module-federation-fmr-npm-0.0.5-5047596128-d8648b1820.zip\node_modules\@module-federation\fmr\src\index.js:207:27)
<e>     at C:\source\.yarn\cache\@module-federation-fmr-npm-0.0.5-5047596128-d8648b1820.zip\node_modules\@module-federation\fmr\src\index.js:171:12
<e>     at Hook.eval [as callAsync] (eval at create (C:\source\.yarn\cache\tapable-npm-2.2.0-516ee6aa5b-5a7e31ddd2.zip\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
<e>     at C:\source\.yarn\__virtual__\webpack-virtual-6b0c007d3f\0\cache\webpack-npm-5.27.2-9c59c0498d-45ea8bd0b4.zip\node_modules\webpack\lib\Compiler.js:825:27
<e>     at C:\source\.yarn\cache\neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip\node_modules\neo-async\async.js:2818:7
<e>     at done (C:\source\.yarn\cache\neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip\node_modules\neo-async\async.js:3522:9)
<e>     at writeOut (C:\source\.yarn\__virtual__\webpack-virtual-6b0c007d3f\0\cache\webpack-npm-5.27.2-9c59c0498d-45ea8bd0b4.zip\node_modules\webpack\lib\Compiler.js:786:16)
<e>     at C:\source\.yarn\__virtual__\webpack-virtual-6b0c007d3f\0\cache\webpack-npm-5.27.2-9c59c0498d-45ea8bd0b4.zip\node_modules\webpack\lib\util\fs.js:227:5
<e>     at Immediate._onImmediate (C:\source\.yarn\cache\memory-fs-npm-0.4.1-0a5f9b8954-6db6c8682e.zip\node_modules\memory-fs\lib\MemoryFileSystem.js:303:5)
<e>     at processImmediate (internal/timers.js:461:21)

This happens maybe 30% of the time when I serve the Federated Module when I test it locally. The behavior ends up being that auto-reloading stops working, but manual reloading does still work. Restarting webpack, usually ends up fixing this.

My guess for why I might be seeing this is that tcpPortUsed.waitUntilUsed never resolved it's Promise, and then _afterEmit is called at some point.

If there is any other info I can help provide, please feel free to let me know, happy to help.

Clarify the nature of closed source with documentation

Would it be possible to add a README here, or modify the wiki here, and maybe update the README of the https://github.com/module-federation/fmr repo, so as to more easily communicate the nature of the project? ๐Ÿ™

I am not questioning the fact that this project is not open contribution, but just want to add some clarity and save others some time. My own path to here was windy:

  1. I found out about the @module_federation/fmr package via Medium
  2. I tried to use the package, but it had some issues (which I have since raised here).
  3. I tried to find the source code to browse issues or open a pull request, but found https://github.com/module-federation/fmr which is not this package, or perhaps a very old version of this package.
  4. I found a Twitter post stating that this would be a closed source package.
  5. Only by chance did I find this particular issues only repository by searching through the module-federation organization.

This is a fantastic package and a great addition to the federated modules ecosystem

Does not work with `[email protected]`

I know this is probably expected bug, as webpack-dev-server introduces breaking changes.

The following message is logged and this plugin no longer working (browser does not refresh).
image

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.