Fixes Docker Angular Build Process
This commit is contained in:
7
src/assets/env.sample.js
Normal file
7
src/assets/env.sample.js
Normal file
@@ -0,0 +1,7 @@
|
||||
(function (window) {
|
||||
window['env'] = window['env'] || {};
|
||||
|
||||
// Environment variables
|
||||
window['env']['backendPath'] = '${BACKEND_URL}';
|
||||
window['env']['backendOAuthPath'] = '${BACKEND_OAUTH_URL}';
|
||||
})(this);
|
||||
@@ -1,5 +1,5 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
backendPath: process.env['BACKEND_URL'],
|
||||
backendOAuthPath: process.env['BACKEND_OAUTH_URL']
|
||||
backendPath: (<any>window).env['BACKEND_URL'],
|
||||
backendOAuthPath: (<any>window).env['BACKEND_OAUTH_URL']
|
||||
};
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
<link rel="preconnect" href="https://hideyoshi-portfolio-dev.s3.amazonaws.com">
|
||||
|
||||
<!-- Loading environment variables -->
|
||||
<script src="assets/env.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import { EnvironmentPlugin } from 'webpack'
|
||||
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
new EnvironmentPlugin({
|
||||
'BACKEND_URL': 'https://api.hideyoshi.com.br',
|
||||
'BACKEND_OAUTH_URL': 'https://api.hideyoshi.com.br'
|
||||
})
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user