Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 30e9c97

Browse files
authored
fix(template): disable minification of css by css-loader (#154)
When uglify is used, it triggers the minification option of the css-loader. The css-loader uses internally cssnano to optimize the size of the stylesheets. Since NativeScript supports only a subset of the CSS language, many of these optimizations may be damaging for the user's css. Such is the case with `background-position`: center, which gets translated to `background-position`: 50%, which is currently not working in NativeScript 3.0 (NativeScript/NativeScript#4201). closes #135
1 parent 3181821 commit 30e9c97

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

‎prepublish/common/rules.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ module.exports = `
1313
loader: "resolve-url-loader",
1414
options: { silent: true },
1515
},
16-
"nativescript-css-loader",
16+
{
17+
loader: "nativescript-css-loader",
18+
options: { minimize: false }
19+
},
1720
"nativescript-dev-webpack/platform-css-loader",
1821
]),
1922
},

‎templates/webpack.angular.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ function getRules() {
8585
loader: "resolve-url-loader",
8686
options: { silent: true },
8787
},
88-
"nativescript-css-loader",
88+
{
89+
loader: "nativescript-css-loader",
90+
options: { minimize: false }
91+
},
8992
"nativescript-dev-webpack/platform-css-loader",
9093
]),
9194
},

‎templates/webpack.javascript.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ function getRules() {
8484
loader: "resolve-url-loader",
8585
options: { silent: true },
8686
},
87-
"nativescript-css-loader",
87+
{
88+
loader: "nativescript-css-loader",
89+
options: { minimize: false }
90+
},
8891
"nativescript-dev-webpack/platform-css-loader",
8992
]),
9093
},

‎templates/webpack.typescript.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ function getRules() {
8484
loader: "resolve-url-loader",
8585
options: { silent: true },
8686
},
87-
"nativescript-css-loader",
87+
{
88+
loader: "nativescript-css-loader",
89+
options: { minimize: false }
90+
},
8891
"nativescript-dev-webpack/platform-css-loader",
8992
]),
9093
},

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /