Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintain the damn tamplates #230

Closed
nextgenthemes opened this issue Apr 21, 2023 · 3 comments
Closed

Maintain the damn tamplates #230

nextgenthemes opened this issue Apr 21, 2023 · 3 comments

Comments

@nextgenthemes
Copy link

nextgenthemes commented Apr 21, 2023

I have to complain about this. https://github.com/sveltejs/template-webpack

I just watched a doc for Svelte and Rich was saying his goal is not adoption but barrier of entry. This is supposedly an offical loader. Yet the template it links to us not maintained. It installs outdated and insecure npm packages. There are already PRs with various fixes w8ing. Updating to the latest packages now gives me:

[webpack-cli] webpack Dev Server Invalid Options

options should NOT have additional properties

I even downgraded webpack-cli and server to the the latest major versions but this does not even fix this, removing the options does not fix it either. If this is supposed to be official then provide a command to start a damn webpack app with the latest (or at least secure) packages.

Furthermore there should be a template that has typescript by default, not some script that transforms the project to typescript as this will also be error prove and not good maintainable. I get that vite is the main official builder but do not claim this is official and then send people into a trail and error hell.

There are Github helpers like depandabot and github actions to test shit, this can and should be at least partially automated. The deps tree is not that big, it should not be that much work to have a up-to-date template for a basic typescript svelte app with webpack.

Just wasted an hour on this BS and my boner for Svelte is limb now.

@syvb
Copy link
Contributor

syvb commented Apr 21, 2023

Just so you know, Webpack isn't the preferred way to bundle Svelte apps. Webpack support isn't very actively maintained and is mostly a community effort - see #206. SvelteKit is probably the way to go for new stuff.

@nextgenthemes
Copy link
Author

@syvb I know this, i mentioned vite in my comment, did you actually read it? They call the webpack builder "official". If they can even have someone approve some PRs for a basic starter template they should remove the official label.

Found out you run npm audit --force it updates webpack-server only and that way it works keeping webpack-cli at 4.x

Then you have to remove the --basedir and replace it with a config (has already a PR with it)

And when running the typescript transform you get an outdated TS with errors so you need to update that as well. The updated base ts config also takes care or a deprecated option. So you basically can update everyone except webpack-cli I guess.

Is Webpack not the worlds most popular bundler right now? I get that Svelte community is small but this is VERY concening. I expect more from something that is supposedly is loved by everyone and mature.

I am trying to integrate this with my monorepo that I use for all my projects with an already pretty complex webpack setup I do not want use another bundler for many reasons.

And I for sure do not need Sveltekit I do not need to build some complex app nor do I need SSR or whatever shit it does, I am just doing some simple things in a single page.

@benmccann
Copy link
Member

Is Webpack not the worlds most popular bundler right now?

It's not in the Svelte community. Vite gets 8x more usage and the gap is growing: https://npmcharts.com/compare/svelte-loader,@sveltejs/vite-plugin-svelte

Anyway, I updated and merged that PR (sveltejs/template-webpack#51)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants