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

Add Online Solitaire to Readme #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

holgersindbaek
Copy link

@holgersindbaek holgersindbaek commented Feb 21, 2022

I run https://online-solitaire.com/, a website where more than 4 million solitaire games are played each month. I make pretty heavy use of react-loadable to speed up the site, so I thought it might be a nice example in the users list.

Add https://online-solitaire.com/ to users list.

I run https://online-solitaire.com/, a website where more than 4 million solitaire games are played each month. I make pretty heavy use of react-loadable to speed up the site.
@ygs-code
Copy link

After I upgraded webpack 4 to wepack5 。The react-loadable plugin failed chunk.forEachModule is not a function.
code:

function buildManifest(compiler, compilation) {
var context = compiler.options.context;
var manifest = {};

compilation.chunks.forEach(function (chunk) {
chunk.files.forEach(function (file) {
chunk.forEachModule(function (module) {
var id = module.id;
var name = typeof module.libIdent === 'function' ? module.libIdent({ context: context }) : null;
var publicPath = url.resolve(compilation.outputOptions.publicPath || '', file);

    var currentModule = module;
    if (module.constructor.name === 'ConcatenatedModule') {
      currentModule = module.rootModule;
    }
    if (!manifest[currentModule.rawRequest]) {
      manifest[currentModule.rawRequest] = [];
    }

    manifest[currentModule.rawRequest].push({ id: id, name: name, file: file, publicPath: publicPath });
  });
});

});

return manifest;
}

How can I fix this bug and make it work?

@ygs-code
Copy link

ygs-code commented Sep 4, 2022

This author doesn't seem to be updating this component, but you can look at similar components that implement SSR PROMISE asynchronous loading,github address :https://github.com/qq281113270/react-lazy-router-dom

@ygs-code
Copy link

ygs-code commented Sep 4, 2022

I run https://online-solitaire.com/, a website where more than 4 million solitaire games are played each month. I make pretty heavy use of react-loadable to speed up the site, so I thought it might be a nice example in the users list.

This author doesn't seem to be updating this component, but you can look at similar components that implement SSR PROMISE asynchronous loading,github address :https://github.com/qq281113270/react-lazy-router-dom

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