Now that we've seen what Watpac does with the common module type, I want to update the contents of
our index dogs and messages files and I want them to instead be written out using the yes module syntax.
So I'll first begin inside of messages.
I'm going to change this module experts to the equivalent code that we would write if you were making
use of its modules.
So that would be export default by their.
I'm going to save that file, I'll go back over to Indexed and I'm going to update this required to
be the equivalent in its module syntax.
So that would be important message from message.
OK, now I've updated both these files, I'm going to run Web back again and then examine the main JS
file again.
So back at my terminal.
I'll do another NPM run build.
OK, that looks good, back at my code, Ed.
I'll find the updated dist main JS file once again.
There's a ton of extra stuff inside of here, but it's definitely different compared to what we had
before.
Again, I'm going to remove all this code and replace it with some cleaned up version without all the
comments and some other stuff stripped out.
Just make it easier to understand.
OK, so here's the cleaned up version, and we're not going to go through this code as in-depth as we
did in just the last video, there's just one very important thing I want to point out.
It looks like generally the structure is very similar here.
We still have this kind of weapon, module's object that is wrapped up the code of all of our different
modules inside of a function.
Watpac is also added in a new web require function right here and then down at the very bottom is some
code to actually kick off our application or start the execution of our app.
That's what's going on right here where it is calling Watpac require on our index file.
So at this point in time, I really just want to stress the fact that Westpac has correctly decided
how to deal with either module system, Watpac has clearly decided that it can work with banks and the
US model system as well, regardless of the model system being used.
Westpac took these two different files, joined them together inside of one file, and then somehow
resolved all these import or require or expert statements to make sure that all these different values
are being shared between these different files correctly.
That's really the only thing I want you to understand around all this Watpac stuff at this point in
time.
OK, so now that we've got that kind of under our belts, let's take another pause here.
When we come back, the next video, we're going to start to get a better understanding and apply all
this new Web pack and babul knowledge, all the transport, other stuff, and really understand how
we're going to start to solve that big problem number three right here.