Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 17 20:43
    aseem2625 commented #80
  • Oct 15 15:19

    bebraw on dev

    chore: Fix formatting chore: Add an example (compare)

  • Oct 15 14:57

    bebraw on dev

    chore: Add a tip fix: Use webpack 5 style for em… chore: Explain webpack 5 target… and 1 more (compare)

  • Oct 15 14:32

    bebraw on dev

    chore: Move test harness to a b… (compare)

  • Oct 14 15:06

    bebraw on dev

    chore: Add a page break (compare)

  • Oct 14 15:04

    bebraw on dev

    chore: Drop an outdated plugin (compare)

  • Oct 14 15:01

    bebraw on dev

    chore: Add page breaks (compare)

  • Oct 14 14:56

    bebraw on dev

    chore: Move pagebreak to a bett… (compare)

  • Oct 14 14:52

    bebraw on dev

    chore: Improve pagebreaks (compare)

  • Oct 14 14:20

    bebraw on dev

    chore: Update output (compare)

  • Oct 14 13:52

    bebraw on dev

    chore: Move output plugins to a… (compare)

  • Oct 14 13:35

    bebraw on dev

    chore: Update to webpack 5 outp… (compare)

  • Oct 14 13:26

    bebraw on dev

    chore: Improve flow (compare)

  • Oct 14 12:15

    bebraw on dev

    chore: Simplify chore: Fit better (compare)

  • Oct 13 14:35

    bebraw on dev

    chore: Mention new default chore: Add a tip chore: Use webpack 5 import (compare)

  • Oct 13 14:30

    bebraw on dev

    chore: Mention webpack 5 hot sy… fix: Use webpack 5 syntax chore: Mention how to configure… and 4 more (compare)

  • Oct 12 14:33

    bebraw on dev

    chore: Add a reference (compare)

  • Oct 12 14:28

    bebraw on dev

    Chore: Mention __webpack_requir… chore: Add a reference (compare)

  • Oct 12 14:11

    bebraw on dev

    fix: Set output.path explicitly fix: Add missing breaks (compare)

  • Oct 12 13:36

    bebraw on dev

    chore: Drop a bit that works in… chore: Drop a redundant referen… chore: Update references and 2 more (compare)

Juho Vepsäläinen
@bebraw
and that's with all features
Stefan Frede
@stefanfrede
I had a look at https://github.com/ryangjchandler/spruce for state management with Alpine.js.
Juho Vepsäläinen
@bebraw
i checked webpack-cli - it's literally using webpack's node api and capturing stats from there
interesting, let me check that one out :)
it's that JS part that's instant turn off for me
i wanted something that can live in HTML. i still use globals for exposing things like highlighting but try to keep that to minimum
that said, spruce likely integrates better with an existing system
it looks like the best bet would be to implement --json to webpack-nano. i'll ask andrew about that
Stefan Frede
@stefanfrede
That woul be cool!
Juho Vepsäläinen
@bebraw
it doesn't add much weight to it
maybe i just get it done now :)
Stefan Frede
@stefanfrede
:)
Juho Vepsäläinen
@bebraw
Stefan Frede
@stefanfrede
Awesome!
Juho Vepsäläinen
@bebraw
andrew has been busy lately but i hope he can get to it soon enough
book driven development :)
that's why i wrote webpack-merge as well - i needed it for the book
Stefan Frede
@stefanfrede
Your book was and is for me the best ressource for a sane webpack config!!!
Juho Vepsäläinen
@bebraw
the approach is still valid - i have a client case where i ported something quite complex into a config package they can share across their projects
these days the trend seems to be that frameworks like next manage webpack config for you
and i guess the next generation will do something a bit different on browser level even. deno is cool in that regard
Stefan Frede
@stefanfrede
It seems that the cool new tools are "dealing" with the complexity of webpack for you, but most often than not you have to tweak someting and then it is good to have at least a bit of an understanding aboout webpack.
Juho Vepsäläinen
@bebraw
definitely, that's when understanding the tool pays off
i know rollup is getting more popular and starting from vue 3, they go with it by default through vite (opinionated rollup)
it's still quite small compared to webpack in terms of downloads, though
Stefan Frede
@stefanfrede
My plan at the moment is to start learning Vue now that v3 is out.
Juho Vepsäläinen
@bebraw
it's interesting to see where vue will be within a year
i feel react has been stagnating a bit as people are waiting for suspense
react 17 won't bring any new features either
at the same time that's a sign of stability
Stefan Frede
@stefanfrede
I start to get the feeling that my portfolio needs one of the big names in it and Vue seems to stick quite closely to the native web components stuff.

at the same time that's a sign of stability

That is true!

Juho Vepsäläinen
@bebraw
i got a quick review from andrew at shellscape/webpack-nano#18 . it's possible the feature lands soon :)
Stefan Frede
@stefanfrede
👍
Juho Vepsäläinen
@bebraw
it was merged - now just waiting for a release
Juho Vepsäläinen
@bebraw
i sketched out a more powerful way to handle arbitrary merges at webpack-merge - survivejs/webpack-merge#150
Stefan Frede
@stefanfrede

it was merged - now just waiting for a release

🎉

Juho Vepsäläinen
@bebraw
i added a powerful new feature to webpack-merge https://twitter.com/bebraw/status/1313774533292240897
now you can merge complex cases declaratively
Juho Vepsäläinen
@bebraw
Stefan Frede
@stefanfrede
@bebraw Thank you!
quanganhtran
@quanganhtran
Good day! If I have a single static bundle that I want to serve with different configs (and/or assets) depending on backend environment, how should I approach this? Preferably without html templating.
right now I'm building two different bundles based on env
but I want to use just one. the env-specific part probably can be extracted out and served remotely or something...
Stefan Frede
@stefanfrede
@quanganhtran Something like this should work:
const commonConfig = { ... };

const productionConfig = { ... };

const developmentConfig = { ... };

module.exports = env => {
  switch(env) {
    case 'development':
      return merge(commonConfig, developmentConfig);
    case 'production':
      return merge(commonConfig, productionConfig);
    default:
      throw new Error('No matching configuration was found!');
  }
}
Juho Vepsäläinen
@bebraw
yup, that's a good pattern
i've found switch/case to be nice for the purpose
Martin Oppitz
@martinoppitz
Hello, I checked webpack v5 with aurelia an svelte. It does not work.
Need we a Ticket?
Juho Vepsäläinen
@bebraw
@martinoppitz is this related to the book content? if it's something beyond the book, like it's best to open a report at https://github.com/webpack/webpack/issues