-
Notifications
You must be signed in to change notification settings - Fork 14
Code minification #734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Code minification #734
Changes from all commits
a4e3c13
e0243e7
5a19b18
66b7318
54d216f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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` | ||||||
| * Added ability to disable code optimizations for debug mode `build/webpack/optimization` | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ## v3.??.? (2022-??-??) | ||||||
|
|
||||||
| #### :house: Internal | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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` | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ## v3.24.0 (2022-08-12) | ||||||
|
|
||||||
| #### :rocket: New Feature | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,5 +107,12 @@ module.exports = function optimization({buildId, plugins}) { | |
| /* eslint-enable camelcase */ | ||
| ]; | ||
|
|
||
| if (config.build.debugMode) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,6 +9,12 @@ Changelog | |||||
| > - :house: [Internal] | ||||||
| > - :nail_care: [Polish] | ||||||
|
|
||||||
| ## v3.??.?? (2022-08-??) | ||||||
|
|
||||||
| #### :rocket: New Feature | ||||||
|
|
||||||
| * Added new property `debugMode` to `build` object | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ## v3.20.0 (2022-04-25) | ||||||
|
|
||||||
| #### :boom: Breaking Change | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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', { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Мне кажется просто debug лучше назвать, т.к. оно и так понятно, что это режим. Плюс у нас есть в настройках есть И тут бы прораститить тот дебаг в этот.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Можно сделать как-то так: добавить параметр/переменную окружения Т.е. можно будет либо включать весь дебаг везде сразу, либо более точно изменять только сборку проекта. Что скажешь?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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' | ||
| }) | ||
| }, | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.