-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
William Marques
committed
Oct 5, 2019
1 parent
0645f3c
commit 7c76001
Showing
5 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const PROXY_CONFIG = [ | ||
{ | ||
context: ['/api', '/services', '/management', '/swagger-resources', '/v2/api-docs', '/h2-console', '/auth'], | ||
target: `http://localhost:8080`, | ||
secure: false | ||
} | ||
]; | ||
|
||
module.exports = PROXY_CONFIG; |
31 changes: 31 additions & 0 deletions
31
generators/client/templates/angular/webpack/webpack.custom.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const webpack = require('webpack'); | ||
const MergeJsonWebpackPlugin = require('merge-jsons-webpack-plugin'); | ||
|
||
module.exports = (config, options) => { | ||
console.log(options); | ||
config.plugins.push( | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
BUILD_TIMESTAMP: `'${new Date().getTime()}'`, | ||
// APP_VERSION is passed as an environment variable from the Gradle / Maven build tasks. | ||
VERSION: `'${process.env.hasOwnProperty('APP_VERSION') ? process.env.APP_VERSION : 'DEV'}'`, | ||
// DEBUG_INFO_ENABLED: options.env === 'development', | ||
// The root URL for API calls, ending with a '/' - for example: `"https://www.jhipster.tech:8081/myservice/"`. | ||
// If this URL is left empty (""), then it will be relative to the current context. | ||
// If you use an API server, in `prod` mode, you will need to enable CORS | ||
// (see the `jhipster.cors` common JHipster property in the `application-*.yml` configurations) | ||
SERVER_API_URL: `''` | ||
} | ||
}), | ||
new MergeJsonWebpackPlugin({ | ||
output: { | ||
groupBy: [ | ||
{ pattern: './src/main/webapp/i18n/en/*.json', fileName: './i18n/en.json' } | ||
// jhipster-needle-i18n-language-webpack - JHipster will add/remove languages in this array | ||
] | ||
} | ||
}) | ||
); | ||
|
||
return config; | ||
}; |