Answer the question
In order to leave comments, you need to log in
How to organize a multi-page application using Webpack?
Hello. Now there is a desktop application, and there was a need to make friends with Webpack.
App structure before:
js/ <!-- В папке лежат некие модули, которые экспортируются в глобальную область при подключени -->
modules/
module-1.js
module-2.js
module-3.js
nav.js
main.js
css/
controls.css
ui.css
pages/
users/
user-page.html <!-- В этом файле подключается user-page.js -->
user-page.js
tasks/
single-task.html <!-- В этом файле подключается tasks.js -->
task-list.html <!-- В этом файле подключается tasks.js -->
tasks.js
index.html <!-- В этом файле подключаются все .js и .css файлы из папок js и css -->
nav.js
. If necessary, it loads, understands from its code that you need to download one or another file in which the codepages
.js
files with the logic of this pagescript
tags to the document, scripts are loaded.js
files contain the declaration of a particular page ( nav.js
exports to the global scope a function for declaring pages and logic for them)nav.js
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question