react-aspnet-boilerplate
react-aspnet-boilerplate copied to clipboard
Various dependency updates
First off, thank you Paul for providing this template. I have two web sites that I've built off of this, and it's worked out great. Since I started up these sites, I've made a bunch of updates, and I thought I'd offer a hand to get them updated here. I'd be happy to work on a pull request, but I wanted to see what all you'd like me to incorporate. Here's a list of what I've changed/updated:
- ASP.NET Core updated to version 2.x
- webpack 4.x
- gulp 4
- react-router 4.x
- added stylelint
- eslint-config-airbnb is latest, which required numerous positive changes
- added functionality to gulpfile, most notably the ability to run in a "watch" mode that runs browserSync and proxies server calls to asp.net core (which the script also runs), monitors for changes and rebuilds while running
- swapped babel for TypeScript (I realize this one may or may not be wanted here)
- for typescript linting, I'm stlll using eslint, but with typescript-eslint-parser and eslint-plugin-typescript to support it (as opposed to using tslint, which doesn't seem to have nearly as many rules available)
- with the exceptions of redux and stylelint, all packages are @latest (redux-thunk is not yet compatible with redux 4, and stylelint-webpack-plugin is not yet compatible with stylelint 9)
Let me know what you think, and if you'd be interested incorporating some or all of this. Then I can start working on a pull request.
Wow. I would love a PR that has these things. As you could tell, I haven't had time to keep dependencies update. Node packages change very often.
As for TypeScript, I'm also on board. I'll never write a new project without it. How much is in TypeScript? Even the jsx/React stuff?
I have both of my sites now converted fully to .ts and .tsx TypeScript files, complete with noImplicitAny turned on.
I'll get to work on a PR. It might take me a couple of weeks; I've been updating my projects incrementally, so I'm exactly not sure how long it'll take me to back-port the changes to this codebase. I'll try to post updates here.
Also, there are two additional caveats I should mention:
- extract-text-webpack-plugin is deprecated for webpack 4, and its functionality is mostly replaced by mini-css-extract-plugin, which I've switched to. However, I've also swapped css-loader for typings-for-css-modules-loader, and the latter does not have the same "/locals" functionality. So, I've got the server bundle running through mini-css-extract-plugin as well, now generating useless CSS. Trying to decide if the CSS typings are worth the annoyance.
- bootstrap-loader is also dependent on the now-deprecated extract-text-webpack-plugin. There's been some effort to swap out the dependency, but it seems stalled, and I've removed the functionality in favor of pulling the bootstrap styles from a CDN. This can be revisited if and when there is an update.
Looks like I spoke too soon about bootstrap-loader; there is a new PR there for webpack 4 support. So hopefully I'll be able to switch that back.
First update on my PR: I got the server side of things updated to .NET Core 2.0, including the identity stuff. The PR will be for master, and once that's in we can push relevant changes to the empty-template branch.
Roger that. I can do this in small chunks if you want to submit now, if you like. Your call.
Ha, thanks for merging the server side! That was fast :-) I'm thinking it might make sense to do the client side in one go, as I don't know how useful any changes would be until I'm all the way through.
I agree.
Thought I'd give an update. What's done so far (and pushed to my fork):
- Upgraded react-router to v4
- Upgraded redux-form to v5 (not latest... I wasn't using this in my projects, and going from 5->6 or 7 is apparently not trivial... we can look at upgrading this later)
- Upgraded all other dependencies (webpack, gulp, etc)
- Now using tsc instead of babel
- It appears I've fixed everything needed to get the boilerplate app running with these changes
What's remaining:
- Rename all .js files to .ts/.tsx and clean up typing issues
- Get project running with noImplicitAny on
After I finish up those last two, I'll submit a pull request!
Hey, sorry I didn't get back to you. I'm still excited for your changes. This project needs a breath of new/fresh air.
Again, I'm aboard with all your notes/comments.
Thanks again!
Not a problem. I've made good progress and should have a PR for you soon.
PR created! Once that's in, I can work on getting the changes pushed out to the empty-template branch (which is what I used as the starting point for my own projects).
Apparently bootstrap-loader has a beta release to work with Webpack 4. It's not quite as simple as swapping it out (need to have separate loaders defined for prod and dev), but I'll try to get a PR together for that before I move on to empty-template.
Figured out the new bootstrap-loader. I just added it to my current PR.