on 2020 Jul 27 8:02 AM
I’ve defined a route in my extension, passing the options object to the start()command, as described here
xsappContext - An object representing the content which is usually put in xs-app.json file. If this property is present it will take precedence over the content of xs-app.json.
As expected, my route, as defined in options, is being used by app router
So I thought I can remove the xs-app file which is not longer needed
But if I delete the xs-app.json file, then approuter throws an error on startup
This seems to be intended: in environment.js, there’s a check if the file is found
var xsappFile = path.join(wdir,'xs-app.json');
if (!fsUtils.isFile(xsappFile)) {
throw new Error('File not found ' + xsappFile);
I don’t understand why this file is still required, when I pass the route as option. Although I agree, config file is better, in my scenario I want to remove the file. Is there a way to get rid of it?
Kind Regards and thanks for advice
Request clarification before answering.
Hi Henri,
I don't have an answer to that question, it could be the intented behavior (which would be strange) or a bug. Please open a ticket for component "BC-XS-APR" to validate this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi mariusobert thanks for your reply!
I've commented out the check in my local node_modules folder - and the app router seems to works fine
User | Count |
---|---|
77 | |
30 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.