Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ subprojects {
targetCompatibility = 1.8

ext {
profile = project.hasProperty('profile') ? profile : 'development'
profile = project.hasProperty('profile') ? profile : 'production'
slf4j_version = "1.7.28"
spring_security_version = "5.3.4.RELEASE"
spring_boot_version = "2.3.3.RELEASE"
Expand Down
8 changes: 4 additions & 4 deletions ngrinder-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"url": "https://github.com/naver/ngrinder.git"
},
"scripts": {
"build-dev": "webpack",
"build-prod": "webpack --p",
"watch-dev": "webpack --watch",
"watch-prod": "webpack --watch --p",
"build-dev": "webpack --d",
"build-prod": "webpack",
"watch-dev": "webpack --watch --d",
"watch-prod": "webpack --watch",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
Expand Down
18 changes: 9 additions & 9 deletions ngrinder-frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ var webpack = require('webpack');
var outputDir = path.resolve('../ngrinder-controller/build/classes/main/static');

var argv = require('yargs').argv;
var productionBuild = argv.p || argv.prod || argv.production || false;
var developmentBuild = argv.d || argv.dev || argv.development || false;

if (productionBuild) {
console.log('### production build is enabled. ga is included and javascript is optimized\r');
} else {
if (developmentBuild) {
console.log('### production build is disabled.\r');
} else {
console.log('### production build is enabled. ga is included and javascript is optimized\r');
}

if (argv.w || argv.watch) {
Expand All @@ -23,14 +23,14 @@ console.log('### passed env is ' + JSON.stringify(argv.env));
var cssLoader = {
loader: 'css-loader',
options: {
sourceMap: !productionBuild,
sourceMap: developmentBuild,
},
};

var lessLoader = {
loader: 'less-loader',
options: {
sourceMap: !productionBuild,
sourceMap: developmentBuild,
},
};

Expand All @@ -42,7 +42,7 @@ module.exports = function (env) {
console.log('### frontend version is ' + ngrinderVersion + '\r');

var webpackConfig = {
mode: productionBuild ? 'production' : 'development',
mode: developmentBuild ? 'development' : 'production',
performance: {
hints: false,
},
Expand Down Expand Up @@ -166,7 +166,7 @@ module.exports = function (env) {
},
]),
new webpack.LoaderOptionsPlugin({
debug: !productionBuild,
debug: developmentBuild,
options: {
context: __dirname,
htmlLoader: {
Expand All @@ -180,7 +180,7 @@ module.exports = function (env) {
],
};

if (!productionBuild) {
if (developmentBuild) {
console.log('### sourcemap is enabled.\r');
webpackConfig.devtool = "#inline-source-map";
} else {
Expand Down