4 ms·
> You can have multiple entries (html files), but share common chunks between them might be difficult in some special cases. This is what I'm trying to do at t
by cytzol 9y ago
> You can have multiple entries (html files), but share common chunks between them might be difficult in some special cases.
This is what I'm trying to do at the moment -- create a static site that's just a bunch of HTML files, while still taking advantage of Sass, CSS modules, and Vue.js components. (God, I love scoped CSS so much.) I'm sure there's a way to get Webpack to do what I want, but I haven't found it yet. prerender-spa-plugin has been a huge help, though.
It seems very similar to when I was learning Git: I know what I want to do, but Git's interface uses a level one layer lower than the one I'm operating on. "Undo the last commit", not "Reset the working tree to the previous commit's, but leave the staging area intact". Webpack's interface seems too abstract for what I want. I want to think in terms of individual pages, not of entry points; components, rather than chunks. Hopefully in five years when flat HTML files are vogue again there'll be a friendlier interface on top of it all.
Edit: I don't mean to be 100% negative in my comment! Webpack has certainly helped me solve problems that, previously, I haven't been able to solve. That alone is great. I just wish it'll go "click" so I can "get" it.
- finchisko 9y agoIf I understand you correctly. You basically want to create completely static website with no javascript (or very little). Something like server side rendering, but without server (or to be precise with only http server) :-). And you've already found webpack module for the job.
- cytzol 9y agoYeah, you got it. I have a webpack.config.js that compiles everything, bundles it together, and spits out a bunch of HTML files. But what I don't have is the confidence that I'm doing things the right way and not using Webpack inappropriately!
- douche 9y agoSounds like a plain-old ASP.NET site with Razor partials.
- mayank 9y agoShameless plug, but I've got a project that builds a static site using Webpack 2 without having to configure it: https://github.com/iceroad/martinet https://github.com/iceroad/martinet Contributions welcome!