0.33.1 - Updating an existing project

I try to update to the latest CLI when it comes out and this one in particular looked worth it because of the Webpack 4 support. I wasn’t optimistic is would work right away but it wasn’t terrible. Here’s how I d did it.

My project is a .NET core app using Typescript and PostCSS.

Step 1

Make sure the project is in source control!

Step 2

Update aurelia-cli

npm i aurelia-cli -g

It didn’t update so deleted node_modules so it wouldn’t pickup my local aurelia-cli.

Step 3

Rerun the build using au new --here, choose the same steps as I did when you set it up (was there an issue for it to remember or is updating an existing project an issue?)

Step 4

Review what has been updated in a compare tool

  • discard any files you don’t need (only a handful)
  • revert any files or sections that removed things you added (PostCSS plugins for me)

Step 5

After running the project it still blew up, this is because the switch to ts-loader means that handling paths is done with a separate plugin called tsconfig-paths-webpack-plugin and it’s a resolve plugin not a regular one. This seems to be a result of switching away from awesome-typescript-loader.

This still didn’t work as enhanced-resolve was the wrong version and missing something needed for webpack 4. I couldn’t see why so I added it to my dev dependencies and it worked!

There is a deprecation warning because the .NET Core Middleware hasn’t been updated yet because it hasn’t broken anything.

Conclusion

The easiest project update so far, despite a few specific NPM issues. In the end only 9 files were updated.

Hopefully this helps you with your update!

1 Like