easy-webpack / core

An easy way to create configuration files for Webpack
MIT License
68 stars 6 forks source link

Additional Easy Webpack preset ideas #7

Open niieani opened 8 years ago

niieani commented 8 years ago

Feel free to post your own ideas here.

┆Issue is synchronized with this Asana task

mike-morr commented 7 years ago

@niieani Does it make sense to rename config-typescript to config-awesome-typescript-loader to make room for config-ts-loader. Possibly make that a naming convention when wrapping loaders and plugins to offer users more choice down the road and to be able to more easily identify what's in the black box.

niieani commented 7 years ago

Actually, I've made that decision consciously - I especially want to remove any cognitive load on the user; offering alternatives usually incurs the thought "so which one is better?" and the need to research, thus increasing it. I find awesome-typescript-loader to be better than the ts-loader for almost all use-cases, but people who already know what they want can always install it and declare its config manually.

Is there any particular use-case you have in mind for which ts-loader works better?

mike-morr commented 7 years ago

I have tried to use awesome-typescript-loader twice, and both times I immediately got a bunch of non-actionable error messages. ts-loader seems to just work without getting in my way. This is just my experience, but both times it ended up being a guessing game on how to troubleshoot. The issue I am experiencing now might be because I haven't figured out all the TS@beta (and friends) nuances yet. I am going through the Aurelia webpack skeleton since it should be a known working example to see what I am doing wrong.

Edit: should clarify both times were probably my fault some how.

niieani commented 7 years ago

If you have a test repo which seems not to work with awesome ts loader I can have a look. I saw most major issues have been resolved in 2.1.0.

mike-morr commented 7 years ago

That would be excellent!

git clone https://github.com/mike-morrison/PnP-JS-Core.git repro-atl
cd repro-atl
git checkout dev-ez-webpack
npm install
npm run dev
niieani commented 7 years ago

Very odd error indeed! I've not come across it. Perhaps try opening an issue here and point them to your reproduction repo.

mike-morr commented 7 years ago

Thanks for taking a look.

alpox commented 7 years ago

Hello all! I created an easy-webpack config for pug files: https://github.com/alpox/config-pug feel free to integrate it with the others! (I hope i've done it right :smile: but it works on my setup)

The same thing should work for .jade files too (jade is the old naming) but i thought it confuses the user when there is a config-pug which works for jade files too so i test only for .pug files.

niieani commented 7 years ago

@alpox looks good! I've forked and added you as a collaborator (you can accept the invite) so you can take care of this plugin here under easy-webpack. I'll publish it to NPM within a week or two as I'm quite busy now.

alpox commented 7 years ago

@niieani Sounds good :smile: thank you for looking on it and accepting it.

agc93 commented 7 years ago

@alpox @niieani Did config-pug end up getting published? I can't see it on the registry at the moment

niieani commented 7 years ago

Oh man, I completely forgot about it publishing it! I'll do that today. Sorry about that.

agc93 commented 7 years ago

Still not published @niieani ? 😢

niieani commented 7 years ago

First thing in the morning @agc93.

the-perks-of-being-a-wallflower-promise-typewriter-bQk3Aw7WBdQ7m

niieani commented 7 years ago

https://www.npmjs.com/package/@easy-webpack/config-pug