Skip to content
Snippets Groups Projects
Commit 281e80bb authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Only allow commonjs modules in external dependencies

parent a90ee15a
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,9 @@ export default {
moduleDirectory: path.join(process.cwd(), 'node_modules')
}
}),
commonjs(),
commonjs({
include: 'node_modules/**'
}),
json(),
replace({
"process.env.BUILD": '"' + build + '"',
......
const vars = require("./vars");
import vars from './vars.js';
module.exports = {
export default {
getAPiUrl: function(path = "", withPrefix = true) {
return vars.apiBaseUrl + (withPrefix ? vars.apiUrlPrefix : "") + path;
},
......
var config = undefined;
switch(process.env.BUILD) {
case "development":
module.exports = {
config = {
apiBaseUrl: 'https://mw-dev.tugraz.at',
apiUrlPrefix: '',
keyCloakClientId: 'auth-dev-mw-frontend',
......@@ -9,14 +10,14 @@ switch(process.env.BUILD) {
break;
case "production":
module.exports = {
config = {
apiBaseUrl: 'https://mw.tugraz.at',
apiUrlPrefix: '',
keyCloakClientId: 'auth-prod-mw-frontend',
};
break;
case "demo":
module.exports = {
config = {
apiBaseUrl: 'https://api-demo.tugraz.at',
apiUrlPrefix: '',
keyCloakClientId: 'auth-dev-mw-frontend',
......@@ -24,9 +25,11 @@ switch(process.env.BUILD) {
break;
case "local":
default:
module.exports = {
config = {
apiBaseUrl: 'http://127.0.0.1:8000',
apiUrlPrefix: '',
keyCloakClientId: 'auth-dev-mw-frontend-local',
};
}
export default config;
common @ b30eaa64
Subproject commit 68e0a4f1f1a3ef6e05aca5216bf8684578ec2229
Subproject commit b30eaa6475ccc65b5f99d2ead86ddbe2b8e015a7
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment