Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 22:38

    depfu[bot] on update

    Update jest to version 27.3.0 (compare)

  • Oct 15 15:40

    depfu[bot] on update

    (compare)

  • Oct 15 15:40
    depfu[bot] closed #828
  • Oct 15 15:40
    depfu[bot] commented #828
  • Oct 15 15:40
    depfu[bot] labeled #830
  • Oct 15 15:40
    depfu[bot] opened #830
  • Oct 15 14:35

    depfu[bot] on update

    Update eslint to version 8.0.1 (compare)

  • Oct 15 01:45
    depfu[bot] labeled #829
  • Oct 15 01:45
    depfu[bot] opened #829
  • Oct 15 00:40

    depfu[bot] on update

    Update jasmine to version 3.10.0 (compare)

  • Oct 11 10:21
    papandreou commented #828
  • Oct 11 09:30
    depfu[bot] labeled #828
  • Oct 11 09:30
    depfu[bot] opened #828
  • Oct 11 08:26

    depfu[bot] on update

    Update eslint to version 8.0.0 (compare)

  • Oct 09 17:25

    depfu[bot] on update

    (compare)

  • Oct 09 17:25
    depfu[bot] closed #826
  • Oct 09 17:25
    depfu[bot] commented #826
  • Oct 09 17:25
    depfu[bot] labeled #827
  • Oct 09 17:25
    depfu[bot] opened #827
  • Oct 09 16:20

    depfu[bot] on update

    Update jest to version 27.2.5 (compare)

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.

Some of the benefits of having the store would be to have a drawer component expose show and hide actions as an example. Then you can just dispatch them from somewhere else. You don't need to prop drill or connect anything.
Peter Müller
@Munter
Any recommendations for an LRU cache that is backed by redis? I can't find a single one in my npm searches that adheres to the LRU interface and has enough usage that I want to bet my production server on it
Andreas Lind
@papandreou
The easiest way to accomplish that is to configure redis itself with the allkeys-lru or volatile-lru eviction strategy and maxmemory.
Then you can use any redis client (I recommend ioredis).
Peter Müller
@Munter
Sounds good. I'll try that.
Andreas Lind
@papandreou
Peter Müller
@Munter
image.png
I love making performance improvements :)