BCE
26 Apr 2019, 12:25 PM
I need start application from apache/nginx web server instead of npm web start. It works good many years with secnha app generated application, but ext-gen generated application doesn't run, it tries to load scripts from folder ${app}\..\node_modules instead of ${app}\node_modules
After app generation there is
"bootstrap": { "base": "${app.dir}/generatedFiles",
"manifest": "${build.id}.json",
"microloader": "bootstrap.js",
"css": "bootstrap.css"
}
Documentation states that path is relative to bootstrap.base so I decided to remove generatedFiles from app.json and index.thml, and this solved the issue. Actually this place files like it was before community edition. But I am curiouse, is there other way to solve the issue without removing generatedFiles folder, but fixing relative pathes?
Moreover, I've checked how it works with npm web start, if it doesn't work with apache/nginx?! Appeared that the issue it present there also but is "fixed" by the way relative paths are resolved: the path is the same and is wrong: ../app.js etc, but as app folder is the root of npm webserver, it translates to localhost:xxxx/app.js so I guess that ext-gen generates wrong app.json configuration that works just by lucky coincedence.
Any suggestion how app.json should be declared to correctly use generatedFiles folder?
After app generation there is
"bootstrap": { "base": "${app.dir}/generatedFiles",
"manifest": "${build.id}.json",
"microloader": "bootstrap.js",
"css": "bootstrap.css"
}
Documentation states that path is relative to bootstrap.base so I decided to remove generatedFiles from app.json and index.thml, and this solved the issue. Actually this place files like it was before community edition. But I am curiouse, is there other way to solve the issue without removing generatedFiles folder, but fixing relative pathes?
Moreover, I've checked how it works with npm web start, if it doesn't work with apache/nginx?! Appeared that the issue it present there also but is "fixed" by the way relative paths are resolved: the path is the same and is wrong: ../app.js etc, but as app folder is the root of npm webserver, it translates to localhost:xxxx/app.js so I guess that ext-gen generates wrong app.json configuration that works just by lucky coincedence.
Any suggestion how app.json should be declared to correctly use generatedFiles folder?