Laravel Mix: Exclude SASS File from Minifying for Production
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I am running Laravel 5.4 and using Laravel Mix to compile my assets. I have two SASS files for production. However, one of them needs to be compiled from SASS to CSS without minifying. I don't see how to do that. Here's what I have in my webpack.mix.js file:
mix.js(
[
'resources/assets/js/app.js',
],
'public/assets/js'
)
.sass(
'resources/assets/sass/app.scss',
'public/assets/css'
)
.sass(
'resources/assets/sass/pdf.scss',
'public/assets/css',
)
.version();
Now, the pdf.scss file is the one that needs to be "un-minified" for production. Is there any way to do so?
Thanks for answers!
laravel sass laravel-5.4 laravel-mix mix
add a comment |
I am running Laravel 5.4 and using Laravel Mix to compile my assets. I have two SASS files for production. However, one of them needs to be compiled from SASS to CSS without minifying. I don't see how to do that. Here's what I have in my webpack.mix.js file:
mix.js(
[
'resources/assets/js/app.js',
],
'public/assets/js'
)
.sass(
'resources/assets/sass/app.scss',
'public/assets/css'
)
.sass(
'resources/assets/sass/pdf.scss',
'public/assets/css',
)
.version();
Now, the pdf.scss file is the one that needs to be "un-minified" for production. Is there any way to do so?
Thanks for answers!
laravel sass laravel-5.4 laravel-mix mix
why you want to do that ? i did not understand. if you dont want to minified css file then just dont write your css in sass file , write direct in a css file and include it in your blade
– Emtiaz Zahid
Nov 26 '18 at 15:11
This is not what the question was about. I need that file to be un-minified because a PDF library I am using handles minified CSS poorly. I still need that file to be SASS because it uses a lot of styles and shared things from the main file.
– Paul Denisevich
Nov 26 '18 at 15:19
understood. rare situation. froom google search i found this. npmjs.com/package/unminify . dont know work or not.
– Emtiaz Zahid
Nov 26 '18 at 15:26
add a comment |
I am running Laravel 5.4 and using Laravel Mix to compile my assets. I have two SASS files for production. However, one of them needs to be compiled from SASS to CSS without minifying. I don't see how to do that. Here's what I have in my webpack.mix.js file:
mix.js(
[
'resources/assets/js/app.js',
],
'public/assets/js'
)
.sass(
'resources/assets/sass/app.scss',
'public/assets/css'
)
.sass(
'resources/assets/sass/pdf.scss',
'public/assets/css',
)
.version();
Now, the pdf.scss file is the one that needs to be "un-minified" for production. Is there any way to do so?
Thanks for answers!
laravel sass laravel-5.4 laravel-mix mix
I am running Laravel 5.4 and using Laravel Mix to compile my assets. I have two SASS files for production. However, one of them needs to be compiled from SASS to CSS without minifying. I don't see how to do that. Here's what I have in my webpack.mix.js file:
mix.js(
[
'resources/assets/js/app.js',
],
'public/assets/js'
)
.sass(
'resources/assets/sass/app.scss',
'public/assets/css'
)
.sass(
'resources/assets/sass/pdf.scss',
'public/assets/css',
)
.version();
Now, the pdf.scss file is the one that needs to be "un-minified" for production. Is there any way to do so?
Thanks for answers!
laravel sass laravel-5.4 laravel-mix mix
laravel sass laravel-5.4 laravel-mix mix
edited Nov 26 '18 at 16:56
Karl Hill
3,44132446
3,44132446
asked Nov 26 '18 at 14:50
Paul DenisevichPaul Denisevich
1,819812
1,819812
why you want to do that ? i did not understand. if you dont want to minified css file then just dont write your css in sass file , write direct in a css file and include it in your blade
– Emtiaz Zahid
Nov 26 '18 at 15:11
This is not what the question was about. I need that file to be un-minified because a PDF library I am using handles minified CSS poorly. I still need that file to be SASS because it uses a lot of styles and shared things from the main file.
– Paul Denisevich
Nov 26 '18 at 15:19
understood. rare situation. froom google search i found this. npmjs.com/package/unminify . dont know work or not.
– Emtiaz Zahid
Nov 26 '18 at 15:26
add a comment |
why you want to do that ? i did not understand. if you dont want to minified css file then just dont write your css in sass file , write direct in a css file and include it in your blade
– Emtiaz Zahid
Nov 26 '18 at 15:11
This is not what the question was about. I need that file to be un-minified because a PDF library I am using handles minified CSS poorly. I still need that file to be SASS because it uses a lot of styles and shared things from the main file.
– Paul Denisevich
Nov 26 '18 at 15:19
understood. rare situation. froom google search i found this. npmjs.com/package/unminify . dont know work or not.
– Emtiaz Zahid
Nov 26 '18 at 15:26
why you want to do that ? i did not understand. if you dont want to minified css file then just dont write your css in sass file , write direct in a css file and include it in your blade
– Emtiaz Zahid
Nov 26 '18 at 15:11
why you want to do that ? i did not understand. if you dont want to minified css file then just dont write your css in sass file , write direct in a css file and include it in your blade
– Emtiaz Zahid
Nov 26 '18 at 15:11
This is not what the question was about. I need that file to be un-minified because a PDF library I am using handles minified CSS poorly. I still need that file to be SASS because it uses a lot of styles and shared things from the main file.
– Paul Denisevich
Nov 26 '18 at 15:19
This is not what the question was about. I need that file to be un-minified because a PDF library I am using handles minified CSS poorly. I still need that file to be SASS because it uses a lot of styles and shared things from the main file.
– Paul Denisevich
Nov 26 '18 at 15:19
understood. rare situation. froom google search i found this. npmjs.com/package/unminify . dont know work or not.
– Emtiaz Zahid
Nov 26 '18 at 15:26
understood. rare situation. froom google search i found this. npmjs.com/package/unminify . dont know work or not.
– Emtiaz Zahid
Nov 26 '18 at 15:26
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53483657%2flaravel-mix-exclude-sass-file-from-minifying-for-production%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53483657%2flaravel-mix-exclude-sass-file-from-minifying-for-production%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
why you want to do that ? i did not understand. if you dont want to minified css file then just dont write your css in sass file , write direct in a css file and include it in your blade
– Emtiaz Zahid
Nov 26 '18 at 15:11
This is not what the question was about. I need that file to be un-minified because a PDF library I am using handles minified CSS poorly. I still need that file to be SASS because it uses a lot of styles and shared things from the main file.
– Paul Denisevich
Nov 26 '18 at 15:19
understood. rare situation. froom google search i found this. npmjs.com/package/unminify . dont know work or not.
– Emtiaz Zahid
Nov 26 '18 at 15:26