At the moment I'm not using the weapon.
Def server now using it is very straightforward though.
We just have to go to the packaged old Jason File and now there instead of light server let's use webpage
dash def server like this.
Now let's start NPM start again.
Now what you'll see is that this now spins up a server running on local host 880 and it spins up the
webpage build workflow.
So if we now visit low those 80 80 we see our project there.
The interesting thing now is if we change something in code for example if just add a console log here
and I saved as you watched the bottom here you see it re compiles.
However if you reload you don't see the log here and all in the sources tab and the webpage source tab
if you go to app.
Yes you don't see the log here.
So it actually did not load the correct code.
This becomes clearer if I delete this bundle js file here for now restart does NPM start process you
will see it still works.
And by the way don't wonder that the dist folder stays empty now in the webpage.
Def server mode the bundle is generated in memory only so it is there and it is loaded by the death
server but it's not actually written to the disk but you will see that if you reload this page novels
of crashes.
Now I set the file would be there but it doesn't seem like it's there.
Right now it's missing on the disk.
As I said and of course we are importing from this bundle J.S. in index HD Himmel but indeed you can
believe me it is generated in memory.
The problem just is things are not wired up correctly at the moment to tweak this we have to go to the
webpage picked conflict J.S. file and there in output actually add a public path key and set this to
dist
if you now safeties and restart.
Now you see it reloads and now you see high here in a source's tab you now also see that correct output
there if you go to the DOT folder source app apt yes you see the console log statement.
And if I now go to app yes and delete that it rebuilds.
And now the console log statement is gone there.
This is just an additional configuration that is needed for the webpage.
Def server to really understand where the output is written to you and where does is relative to the
index H to mail file because by default the webpage def server serves an index each file.
It finds in the same folder as you run this script here which is correct but then it doesn't make the
connection to the deceitful incorrectly which is why we have to inform Westpac def server with public
path where to find our assets.
So our model J has followed this case.
Now if we quit the development server there is one other setting a one apply year in development mode
and I'll do this right at the top of the export exported object.
That mode to development.
This will in the end tell webpage that here we're building for development and that it will do fewer
optimizations to improve our development experience make debugging even easier and give us more meaningful
error messages for example.
So in development we also definitely want to add this key here and with Dad and the webpage deaths to
reconfigured we now get the finished development workflow now for production will need to adjust as
workflow a bit because dear we wanted different output.