Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 24 17:01

    depfu[bot] on update

    (compare)

  • Oct 24 17:01

    papandreou on master

    Update eslint to version 8.1.0 Merge pull request #835 from un… (compare)

  • Oct 24 17:01
    papandreou closed #835
  • Oct 24 08:50
    depfu[bot] closed #830
  • Oct 24 08:50

    depfu[bot] on update

    (compare)

  • Oct 24 08:50
    depfu[bot] commented #830
  • Oct 24 08:50
    depfu[bot] labeled #835
  • Oct 24 08:50
    depfu[bot] opened #835
  • Oct 24 07:46

    depfu[bot] on update

    Update eslint to version 8.1.0 (compare)

  • Oct 22 20:01

    depfu[bot] on update

    (compare)

  • Oct 22 20:01

    papandreou on master

    Update hyperlink to version 5.0… Merge pull request #834 from un… (compare)

  • Oct 22 20:01
    papandreou closed #834
  • Oct 22 19:55
    depfu[bot] labeled #834
  • Oct 22 19:55
    depfu[bot] opened #834
  • Oct 22 18:50

    depfu[bot] on update

    Update hyperlink to version 5.0… (compare)

  • Oct 22 11:10
    depfu[bot] synchronize #832
  • Oct 22 11:10

    depfu[bot] on update

    Update jest to version 27.3.1 (compare)

  • Oct 22 10:16
    depfu[bot] edited #832
  • Oct 22 10:16

    depfu[bot] on update

    (compare)

  • Oct 22 10:16

    papandreou on master

    Update karma to version 6.3.5 Merge pull request #833 from un… (compare)

Andreas Lind
@papandreou
Yeah, it's a good way to turn your opinions into law :)
Gustav Nikolaj
@gustavnikolaj
For all the talk about keeping things default and avoiding custom stuff like the plague.....
Do you guys have any experience with alternatives to require.context in webpack? I'd like a way to glob all files matching a specific pattern, and then use import to code-split each of them into their own bundle. If I use require.context I'll just end up with all in the same bundle
Or without webpack?
Gustav Nikolaj
@gustavnikolaj
Yeah, but I need to be able to have a glob pattern across subfolders. Webpack only is fine
Andreas Lind
@papandreou
I remember having fought that at some point, and also helped implement the equivalent thing in the assetgraph system.js integration, so I can at least say that it's hairy! But I don't know off the top of my mind.
Gustav Nikolaj
@gustavnikolaj
Yeah, you need to plugin in a pretty early phase. I don't think it's possible without a custom plugin at this point. At least not if you want to be able to have bundle barriers at those points
Gustav Nikolaj
@gustavnikolaj
The easy, non webpack specific fix, is to just have a pre-start script that will build a js file with a bunch of paths in an array that I can import :)
Andreas Lind
@papandreou
If there's no bundle splitting etc. required, yeah
Gustav Nikolaj
@gustavnikolaj
Right, I'd need to actually generate the code from the list of values.

export default {
  "./path/to/file.js": () => import('./path/to/file.js'),
  // ...
}
Andreas Lind
@papandreou
Ah
Gustav Nikolaj
@gustavnikolaj
The main drawback is that you'd have to restart webpack for it to pick up on new matches
Andreas Lind
@papandreou
That's a nice low-tech way to do it if that stuff doesn't change all the time
I wonder if you also need to "memoize" the imports to avoid re-importing, or if the browser has a module cache.
Gustav Nikolaj
@gustavnikolaj
what would the browsers module cache do here? isn't it translated to webpacks bundle format?
or are you talking in the non-webpack case?
Andreas Lind
@papandreou
Ah, right, webpack's loader will handle it
But yeah, also the non-webpack case. I'm revealing my agenda of having the dev setup work without a bundler ;)
Gustav Nikolaj
@gustavnikolaj
I'm almost a little ashamed to admit, but what I'm doing is a reimplementation of react storybook. :p I got sick and tired with upgrading the real one. It's such a simple tool but they manage to make it progressively worse and worse.
Andreas Lind
@papandreou
Sounds like you should just have stayed on the old version :)
Gustav Nikolaj
@gustavnikolaj
Yeah, but that meant that I would be prevented from upgrading webpack
Andreas Lind
@papandreou
Argh....
Gustav Nikolaj
@gustavnikolaj
Yeah, just my thought
Andreas Lind
@papandreou
This discussion is making me depressed.
Gustav Nikolaj
@gustavnikolaj
hehe
my new version is very simplistic - it's actually quite close in terms of being able to work without webpack
I don't think you should get depressed as much as just reinforced in your goals about having a working dev setup without a bundler.
All of these problems come from people building "neat tools that work great", and people trying to "make it easy for junior developers".
Gustav Nikolaj
@gustavnikolaj
I'll stop before I loose the grip :D
Andreas Lind
@papandreou
Yeah, I know you're one of the good guys :heart:
Sune Simonsen
@sunesimonsen
You see my motivation for making a new platform even if it is a totally stupid mission 😝
Sune Simonsen
@sunesimonsen
I'm lazy loading here but Rollup figures out how to hash the sub bundles and everything if I include this plugin.
Gustav Nikolaj
@gustavnikolaj
@sunesimonsen My only complaint with the direction of your approach is that it feels a bit "platformy" for my taste :) It's all or nothing. I think that sets a really high bar, but on the other hand, I also understand that it does have benefits. It allows you to tailor the experience much more and to be much more helpful in general.
That dynamic-import-variable approach seems to be roughly equivalent to what webpack supports. What I need is probably best explained with glob syntax: src/**/*.story.js
Sune Simonsen
@sunesimonsen
I know, if we need to advance we need to throw out all of the shit that drag us down. We have build large applications at one where we basically build everything, it is very possible to make make something new.
Gustav Nikolaj
@gustavnikolaj
It is and sometimes you should. I just don't know if I need a component library to go with my state management :sweat_smile: ;-)
But don't listen to me. I should have told you how keen I am following your work rather than point out the one thing I'm skeptical about :) <3
Sune Simonsen
@sunesimonsen
But all parts but the view and the components can be used with preact or react
You don’t need to use the component library.
They are not tied together
The component library needs the store and the view
Gustav Nikolaj
@gustavnikolaj
I'll have to give it a spin soon. I know I've been saying so for a while, but it's been a while since I have been at a computer outside work :D
I get it - it makes sense. It's only in that because it's easier to keep it part of the same mono-repo when you play around with it :)
@sunesimonsen what's the stability status of https://github.com/sunesimonsen/stylewars ? Is it used anywhere in production yet?
Sune Simonsen
@sunesimonsen
stylewars isn’t used in production yet, but it is insanely simple and well tested so I don’t think it would cause you problems.
It would be nice to have a babel plugin to optimize the css inside the bundles
I question your statement about not wanting a state management library for you component library. First of all you do get a weak state management library from react. But I think it opens a lot of possibilities to have a state management as the core of the platform, it changes the way you can interact with everything.
But I'm not expecting you to jump on this, it is not ready yet and I know it is a lot of drastic ideas.
Sune Simonsen
@sunesimonsen

That dynamic-import-variable approach seems to be roughly equivalent to what webpack supports. What I need is probably best explained with glob syntax: src/**/*.story.js

You can't do that in plain ES6, you need to produce a valid URL.