D
D
Delakey Blackhole2017-03-27 22:56:00
Angular
Delakey Blackhole, 2017-03-27 22:56:00

Angular2 webpack what to do with requests to node_modules folder?

through webpack, I compile the Angular2 application
npm run build
on the output,
20170327-z9qg-17kb.jpg
transfer it to the server folder, open it in the browser and see that scripts are being loaded from node_modules (which, of course, is not there)
20170327-tiqj-158kb.jpg
what should I do with this copy the folder to the server? Or something where in the configs you need to change?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
iBird Rose, 2017-03-27
@DELAKEY

You don't need to copy the entire folder. pull out only what is connected in index.html via script

D
DarthJS, 2017-03-28
@DarthJS

The configs must specify the directory for output, vendor - this is the collected (possibly minified by you) either baver or node modules or that should be connected to the index.html file.
Perhaps scripts of node modules were previously connected in index.html.
I also have a suspicion that this is all, along with the assembly, lies at the root and when the server is raised, they give errors, especially since either node of the module has a status of not 400, but 500

K
Konstantin Kitmanov, 2017-03-28
@k12th

You have taken a template from SystemJS and are using it with webpack. Firstly, the template from the docks is purely educational and should not be used in production, and secondly, systemjs does not make any sense with webpack.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question