Webpack will allow us to use
Let’s practice bundling several files with Webpack!
Let’s start by importing the function from greetUser.js as
greet and the data from myUser.js as
user into src/index.js.
Next, let’s add export statements to greetUser.js and myUser.js. Export
greet from greetUser.js and
user from myUser.js.
Let’s run the
There’s still going to be a warning about the mode, we will fix that in the next Exercise.
Take a look at the built code inside of dist/main.js.
Click “Run” when you are ready to move on.