The next little optimization that we're going to make is going to be to improve our unresolved function.
So, again, we've got this hardcoded check to look for an exact path of tiny test package.
That means that we can only ever import just that package off of the unpackaged website.
So we're going to make sure small change here that if we ever tried to import a file with a path other
than index stocks, we're going to assume that is going to be some module posted at unpackaged dot com
will then start to generate that.
You are dynamically we're going to first once again do this in a somewhat naive fashion, realize that
it doesn't quite work in some scenarios, and then come back and make some changes to it.
They're going to first begin by commenting out all of that case like.
So I'll keep it around for just a moment just in case we need to refer back to it.
So then if we ever have a unresolved call file with a path other than index dogs.
I'm going to immediately return an object again, give it a namespace of those names, faces are eventually
going to be relevant, by the way, not just yet, but they will eventually.
And then we will put in a path for right now that is going to be a template string will put in colon
slash, unpackaged dot com slash.
And then thylacine curly braces and then the package name, which is essentially just our exact path,
we'll put in args dot pat like so.
Now, just to be precise, that is eventually just going to give us a whirl of something like that right
there.
So this is eventually going to cause us a little bit of problems, but it's going to work for right
now.
OK, so let's say this vile.
Go back over to the browser.
I'm going to refresh again.
Zimet Yup, looks like it all still works.
So I did just mention that, hey, this isn't always going to work.
Let's take another pause, come back in next video and start to see where this approach starts to fall
apart.