tmeasday / storybook-skeleton

3 stars 1 forks source link

Alternative to webpack-virtual-modules? #27

Open 7rulnik opened 3 years ago

7rulnik commented 3 years ago

webpack-virtual-modules doesn't support webpack cache https://github.com/sysgears/webpack-virtual-modules/issues/76.

As I understand whole idea of this plugin kinda does not fit webpack's maintainers vision https://github.com/webpack/webpack/issues/11074#issuecomment-648658214

Not sure about good alternatives but maybe we just can generate files before build and store it in node_modules/.cache/storybook?

BTW maybe we should move this discussion into storybook repo.

/cc @shilman

tmeasday commented 3 years ago

Yes, I've seen that comment before, thanks for reminding me!

In that comment it is suggested:

You can also use a loader without an input file if you like to generate files out of the void (maybe from passed options).

I think that's probably what we want to do here.

I think it would be easiest to prototype such an approach here in the skeleton, and then assuming it works, to carry over the approach to SB core when we refactor it. Would you be interested in trying that out @7rulnik?

larixer commented 1 year ago

@7rulnik The issue has been resolved at webpack-virtual-modules side, please re-check whether this issue is still valid.