I'm trying to convert an angular2 with webpack2 project to angular-cli based project.
if I understood correctly, angular-cli now supports webpack. in my original project I injected the following app.config.js:
module.exports = {
webServer: {
appBaseHref : JSON.stringify("/")
},
auth0: {
apiKey: JSON.stringify("API_KEY"),
domain: JSON.stringify("DOMAIN.auth0.com"),
callbackUrl: JSON.stringify("CALLBACK_URL")
}
};
by adding the following to webpack.config.js file:
const appConfig = require("./config/app.config");
const DefinePlugin = require("webpack/lib/DefinePlugin");
...
module.exports = {
plugins: [
new DefinePlugin({
APP_CONFIG: appConfig
}),
...
then in my typescript project i would declare APP_CONFIG with declare var APP_CONFIG:any; and then I would use it's properties. how can I inject such an object in an angular-cli project?
thanks
childProcess.execSync('git rev-list HEAD --count').toString();