I have migrated over to Webpack 4 for Built With Aurelia and I am using the fantastic Aurelia Store plugin.
During development, everything worked fine, but when I would do a production build the state management aspect would fall apart, complaining about something to do with the function that notifies Redux Dev Tools about the change (what the action name and state value was).
It took a lot of trial and error (a solid day) for me to work out what was going on.
I have been asked this question a few times and it can be hard to see things from the perspective of a newcomer to Aurelia, given how long I have been working with it. What is obvious to me is not obvious to everyone else.
When you’re deciding to build an Aurelia application, you’ll discover there is a CLI tool called Aurelia CLI and on Github, a collection of different skeleton applications for building an Aurelia application (preconfigured with testing, some routes and other logic).
The answer to this isn’t scientific, you should choose the CLI. The skeletons are representative of a time when Aurelia didn’t have a CLI, when it was still in alpha, beta and release candidate stages.
Recently whilst I was attempting to port over a TypeScript/Webpack based Aurelia application to work with Aurelia’s newly released server-side rendering functionality, I encountered an annoying error with Firebase Firebase App named '[DEFAULT]' already exists.
Previously, my code looked like this:
import * as firebase from 'firebase'; const config = { apiKey: "", authDomain: "", databaseURL: "", projectId: "", storageBucket: "", messagingSenderId: "" }; export default firebase.initializeApp(config); Because of the way server-side rendering works, it meant that Firebase was being spun up multiple times in my app. This previously wasn’t a problem because of one codebase. To fix it, you just need to alter your default export a little bit.
For years, I have greatly undervalued my own time as a developer. In the beginning, I did not want to set my hourly rate too high because I did not have much consulting/freelancing experience. I wanted the work (chicken and egg problem) but lacked the experience.
As a freelancer, it can be hard to figure out your hourly rate. If you are new to freelancing or not sure what you are worth, you will probably settle on a fairly low rate. You might actually look around and see what other people are charging, which can be a mistake.
When you are building an Aurelia plugin and you want to test it, you will want to use npm link or yarn link to create a local symbolic link to your module and then use it in a test application.
If you are working with Aurelia and Webpack, then you’ve probably run into an issue with linked Node modules can’t resolve files correctly. You might have some code in your plugin that looks like this in an index.js / index.ts.
Towards the early part of 2017, I embarked on creating a bunch of quick single-purpose web applications to keep myself busy and sharp. One of those apps was a temporary file storage web application called Tempfile.cloud.
The premise was simple: you get 1gb of free upload space and your files have an expiry of 24 hours.
I threw some advertisements on there and then shared it around. Surprisingly, it got some traffic. Turns out file sharing sites not covered in malware-laced banner ads/widgets, require you to signup and have no Russian tracking scripts resonate.
If you’re like me, you’ve been using the Linux Subsystem in Windows for a while now. The amazement that I can run Ubuntu Linux from within Windows itself is still not lost on me.
Recently whilst I went on a configuration rampage in VSCode, really fine-tuning my settings to create the best development environment possible (I’ll share those settings in a separate post), and I discovered the integrated terminal supports not only Command Prompt and PowerShell, but also the Windows System for Linux (WSL) terminal.
For years now, bubbling underneath the surface there has been a proverbial sewer of Javascript frameworks and libraries flowing through the community.
It got to the point where it just felt overwhelming for a lot of developers (myself included), around 2016 is when I started noticing people getting fed up.
Looking back over the years, I can remember when jQuery was the new and shiny library. Then it was Backbone for a little while. I also remember when Angular was the developer darling.
For years, I wanted the ability to use variables as object keys in Javascript. Thanks to ES2015, we got the ability to have computed object keys from within the object definition itself.
This isn’t a new or cutting-edge addition, we’ve had it in Javascript for a while now and it is well-supported. The reason for talking about them is a lot of developers do not know about these features or simply forget about them.
Did you know Aurelia introduced an else attribute a while ago which allows you to do if/else statements in your views complete with support for animation?
If you have been working with Aurelia for more than a few months, then you probably have been working with if/else statements by using multiple if.bind attributes in your HTML or using a terniary inside of string interpolation curlies. But, the else attribute allows us to write cleaner HTML without the need for multiple if statements doing the inverse of one another.