Open vdolbnya opened 7 years ago
I've renamed the issue - we can certainly support something like:
return builder.buildStatic('./boot', outputFile, {
publicBaseURL: '/content/app/'
});
That then adds this prefix to __moduleName
, module.id
in CommonJS, etc.
Any PRs welcome here.
Perhaps browserBaseURL
makes more sense as the name.
I have an Angular2 application which is started by following:
I'm creating bundle using following script Bundle.js is creating by following script:
My systemjs.config.js is:
and I'm trying to resolve relative templateUrl and styleUrl paths in components using following approach:
Without bundling all works fine and and moduleName in case of this component is equals to http://localhost:9000/content/app/security-ui/users/components/user.list.js But in case of bundling moduleName is different: security-ui/users/components/user.list.js as you see http://localhost:9000/content/app/ is missing but in fact system will work with __moduleName like content/app/security-ui/users/components/user.list.js and difference is content/app which is in fact my base href.
So question is: how I can configure system.config.js or builder.loadConfig to to prefix __moduleName with my base href or is there is another way to overcome this problem?