Skip to content
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

Color's classes not included when building app #970

Closed
sebastienroul opened this issue Oct 8, 2017 · 3 comments
Closed

Color's classes not included when building app #970

sebastienroul opened this issue Oct 8, 2017 · 3 comments

Comments

@sebastienroul
Copy link
Contributor

sebastienroul commented Oct 8, 2017

Software version

Quasar: 0.14.4
OS: Linux
Node: 6.11.3
NPM: 5.4.2
Browsers: Chrome, FF, IE, ...
iOS: Not tested
Android:
Any other software related to your bug:

What did you get as the error?

Color's classes are not there after building.

What were you expecting?

Color's classes to be there :o)

What steps did you take, to get the error?

Simple scenario :

quasar init toto

Modify the Hello.vue to add class "bg-orange-3" to the

<q-toolbar-title class="bg-orange-3>

npm run dev => Everything is OK, I have my ugly orange in the nice toolbar
npm run build + run via any http server => **NOT OK, My ugly orange is not there **

I inspected the css file generated by the build => There no class named "orange-3" or "bg-orange-3"...

@sebastienroul
Copy link
Contributor Author

Upgrading quasar-cli to 0.6.4 fix the problem.

@sebastienroul
Copy link
Contributor Author

OK, back on this issue : ** upgrade quasar-cli is not the solution **
I found the problem : If you don't make any reference explicitly to a class (like bg-orange-3") then the class is dropped from the packaging at the build time.
It would be a very nice trick, but most of our usage of "color" are made like :class="'bg-' + current.color" cause we use colors choosen by the user, so we don't make explicit usage of the name of the class.

Any idea how to skip this feature (I thonk it's not Quasar himselft, but something around webpack) ?

@sebastienroul sebastienroul reopened this Oct 8, 2017
@sebastienroul
Copy link
Contributor Author

OK : see quasarframework/quasar-template-default#45 for managing purified classes...
Hope it helps..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant