Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Commit

Permalink
fix(css): disable minification when using uglify (#383)
Browse files Browse the repository at this point in the history
* fix(css): disable minification when using uglify

related to #154, #135
fixes #377

* refactor: inline css-loader options
  • Loading branch information
sis0k0 authored Jan 9, 2018
1 parent 8a20502 commit 8e1a5a6
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
16 changes: 14 additions & 2 deletions templates/webpack.angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,20 @@ module.exports = env => {
{ test: /\.html$|\.xml$/, use: "raw-loader" },

// tns-core-modules reads the app.css and its imports using css-loader
{ test: /[\/|\\]app\.css$/, use: "css-loader?url=false" },
{ test: /[\/|\\]app\.scss$/, use: ["css-loader?url=false", "sass-loader"] },
{
test: /[\/|\\]app\.css$/,
use: {
loader: "css-loader",
options: { minimize: false, url: false },
}
},
{
test: /[\/|\\]app\.scss$/,
use: [
{ loader: "css-loader", options: { minimize: false, url: false } },
"sass-loader"
]
},

// Angular components reference css files and their imports using raw-loader
{ test: /\.css$/, exclude: /[\/|\\]app\.css$/, use: "raw-loader" },
Expand Down
14 changes: 12 additions & 2 deletions templates/webpack.javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,18 @@ module.exports = env => {
rules: [
{ test: /\.(html|xml)$/, use: "raw-loader" },

{ test: /\.css$/, use: "css-loader?url=false" },
{ test: /\.scss$/, use: ["css-loader?url=false", "sass-loader"] },
{
test: /\.css$/,
use: { loader: "css-loader", options: { minimize: false, url: false } }
},

{
test: /\.scss$/,
use: [
{ loader: "css-loader", options: { minimize: false, url: false } },
"sass-loader"
]
}
]
},
plugins: [
Expand Down
14 changes: 12 additions & 2 deletions templates/webpack.typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,18 @@ module.exports = env => {
rules: [
{ test: /\.(html|xml)$/, use: "raw-loader" },

{ test: /\.css$/, use: "css-loader?url=false" },
{ test: /\.scss$/, use: ["css-loader?url=false", "sass-loader"] },
{
test: /\.css$/,
use: { loader: "css-loader", options: { minimize: false, url: false } }
},

{
test: /\.scss$/,
use: [
{ loader: "css-loader", options: { minimize: false, url: false } },
"sass-loader"
]
},

{ test: /\.ts$/, use: "awesome-typescript-loader" }
]
Expand Down

0 comments on commit 8e1a5a6

Please sign in to comment.