Skip to content
Open
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ Changelog

_Note: Gaps between patch versions are faulty, broken or test releases._

## v3.??.?? (2022-08-??)

#### :rocket: New Feature

* Added new property `debugMode` to `build` object `config/default`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Added new property `debugMode` to `build` object `config/default`
* Added a new property `build.debugMode` `config/default`

* Added ability to disable code optimizations for debug mode `build/webpack/optimization`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Added ability to disable code optimizations for debug mode `build/webpack/optimization`
* Debugging mode now disables code minimization `build/webpack/optimization`


## v3.??.? (2022-??-??)

#### :house: Internal
Expand Down
6 changes: 6 additions & 0 deletions build/webpack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Changelog
> - :house: [Internal]
> - :nail_care: [Polish]

## v3.??.?? (2022-08-??)

#### :rocket: New Feature

* Added ability to disable code optimizations for debug mode `build/webpack/optimization`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Added ability to disable code optimizations for debug mode `build/webpack/optimization`
* Debugging mode now disables code minimization


## v3.24.0 (2022-08-12)

#### :rocket: New Feature
Expand Down
7 changes: 7 additions & 0 deletions build/webpack/optimization.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,12 @@ module.exports = function optimization({buildId, plugins}) {
/* eslint-enable camelcase */
];

if (config.build.debugMode) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А оно только JS не сжимает, или CSS тоже?

По хорошему надо бы оставить все.

opts.minimize = false;
opts.chunkIds = 'named';
opts.moduleIds = 'named';
opts.mangleExports = false;
}

return opts;
};
6 changes: 6 additions & 0 deletions config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Changelog
> - :house: [Internal]
> - :nail_care: [Polish]

## v3.??.?? (2022-08-??)

#### :rocket: New Feature

* Added new property `debugMode` to `build` object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Added new property `debugMode` to `build` object
* Added a new property `build.debugMode`


## v3.20.0 (2022-04-25)

#### :boom: Breaking Change
Expand Down
13 changes: 13 additions & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,19 @@ module.exports = config.createConfig({dirs: [__dirname, 'client']}, {
suit: o('suit', {
env: true,
default: 'demo'
}),

/**
* If true, all code optimizations will be disabled which is suitable for application debugging
*
* @cli debug-mode
* @env DEBUG_MODE
*
* @returns {boolean}
*/
debugMode: o('debug-mode', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мне кажется просто debug лучше назвать, т.к. оно и так понятно, что это режим.

Плюс у нас есть в настройках есть

/** @override */
	runtime() {
		return {
			...super.runtime(),
			engine: this.engine(),

			debug: false,

И тут бы прораститить тот дебаг в этот.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug из рантайма попадает в конфиг моника, а также в глобальные константы. Не получится ли так, что кто-то с этим дебагом (из runtime) подвяжется на изменение отображения или подключение других зависимостей. А я всего-лишь хочу, чтобы всё, что было в проде, просто собралось чуть подубонее для дебага.

Можно сделать как-то так: добавить параметр/переменную окружения debug-build, которая будет делать то, что сейчас debug-mode, а ещё сделать параметр/переменную окружения debug, которая будет включать debug-build а так же проставлять debug в runtime.

Т.е. можно будет либо включать весь дебаг везде сразу, либо более точно изменять только сборку проекта. Что скажешь?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну в принципе да, можно сделать в конфиге

build.debug -- параметр debug-build

и debug в корне, который включает build.debug и runtime.debug

env: true,
type: 'boolean'
})
},

Expand Down