Repository navigation
feat(webpack): mark the CSS type for stylable views explicitly - #5257
Conversation
eb451a0 to
a30708c
Compare
a30708c to
95f609a
Compare
95f609a to
3bc17b5
Compare
Depends on: NativeScript/android#923 NativeScript/NativeScript#5257 BREAKING CHANGES `uglifyMangleExcludes` is no longer exported from the nativescript-dev-webpack plugin and shouldn't be used in the webpack configuration. Before: ``` // webpack.config.js // ... uglifyOptions: { mangle: { reserved: nsWebpack.uglifyMangleExcludes }, // ... } ``` After: ``` // webpack.config.js // ... uglifyOptions: { // ... } ```
|
test uitests sdk webpack |
|
test branch_android#plamen5kov/revert branch_webpack#vlaeva/remove-mangle-excludes testsappng |
|
test branch_android#plamen5kov/revert branch_webpack#vlaeva/remove-mangle-excludes testsappng sdk uitests cuteness qsf groceries |
|
test branch_android#plamen5kov/revert branch_webpack#vlaeva/remove-mangle-excludes testsappng sdk uitests cuteness qsf groceries animations |
|
test branch_android#plamen5kov/revert branch_webpack#vlaeva/remove-mangle-excludes branch__testsappng#master branch_sdk#master branch_cuteness#master branch_qsf#master branch_groceries#master branch_animations#master |
|
test branch_android#plamen5kov/revert branch_webpack#vlaeva/remove-mangle-excludes branch_testsappng#master branch_sdk#master branch_cuteness#master branch_qsf#master branch_groceries#master branch_animations#master |
|
test branch_webpack#vlaeva/remove-mangle-excludes branch_testsappng#master branch_sdk#master branch_cuteness#master branch_qsf#master branch_groceries#master branch_animations#master |
|
This one should be rebased since we cannot build modules |
We want webpack's uglification to mangle function and class names
but that's what the current implementation of the CSS in {N} relys on
to get the CSS type for each view when targeted by CSS type selectors.
The implementation is changed a little so now the CSS type can be set
directly on the prototype of each View class or for TS, through decorator.
BREAKING CHANGE: Extending classes requires marking the derived class with @csstype
The root classes are not marked with CSSType and classes derived from ViewBase and View
will continue to work as expected. More concrete view classes (Button, Label, etc.) are
marked with @csstype now and store their cssType on the prototype suppressing the previous
implementation that looked up the class function name. So clien classes that derive from one of
our @csstype decorated classes will now have to be marked with @csstype.
3bc17b5 to
93ab567
Compare
|
@SvetoslavTsenov, rebased |
|
test branch_webpack#vlaeva/remove-mangle-excludes branch_testsappng#master branch_sdk#master branch_cuteness#master branch_qsf#master branch_groceries#master branch_animations#master |
|
👍 |
Depends on: NativeScript/android#923 NativeScript/NativeScript#5257 BREAKING CHANGES `uglifyMangleExcludes` is no longer exported from the nativescript-dev-webpack plugin and shouldn't be used in the webpack configuration. Before: ``` // webpack.config.js // ... uglifyOptions: { mangle: { reserved: nsWebpack.uglifyMangleExcludes }, // ... } ``` After: ``` // webpack.config.js // ... uglifyOptions: { // ... } ```
Depends on: NativeScript/android#923 NativeScript/NativeScript#5257 BREAKING CHANGES: `uglifyMangleExcludes` is no longer exported from the nativescript-dev-webpack plugin and shouldn't be used in the webpack configuration. Before: ``` // webpack.config.js // ... uglifyOptions: { mangle: { reserved: nsWebpack.uglifyMangleExcludes }, // ... } ``` After: ``` // webpack.config.js // ... uglifyOptions: { // ... } ```
Depends on: NativeScript/android#923 NativeScript/NativeScript#5257 BREAKING CHANGES: `uglifyMangleExcludes` is no longer exported from the nativescript-dev-webpack plugin and shouldn't be used in the webpack configuration. Before: ``` // webpack.config.js // ... uglifyOptions: { mangle: { reserved: nsWebpack.uglifyMangleExcludes }, // ... } ``` After: ``` // webpack.config.js // ... uglifyOptions: { // ... } ```
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
We want webpack's uglification to mangle function and class names
but that's what the current implementation of the CSS in {N} relies on
to get the CSS type for each view when targeted by CSS type selectors.
The implementation is changed a little so now the CSS type can be set
directly on the prototype of each View class or for TS, through decorator.
BREAKING CHANGES
Extending classes requires marking the derived class with
@CSSTypeThe root classes are not marked with
@CSSTypeand classes derived from ViewBase and Viewwill continue to work as expected. More concrete view classes (Button, Label, etc.) are
marked with
@CSSTypenow and store their cssType on the prototype suppressing the previousimplementation that looked up the class function name. So client classes that derive from one of
our
@CSSTypedecorated classes will now have to be marked explicitly with@CSSType.