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

Brightness slider not visible on production build #13

Open
klickreflex opened this issue Jun 6, 2020 · 8 comments
Open

Brightness slider not visible on production build #13

klickreflex opened this issue Jun 6, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@klickreflex
Copy link
Owner

klickreflex commented Jun 6, 2020

Somehow styling for the brightness slider is lost on production builds (yarn build). It seems not related to PurgeCSS, as that is configured to only purge Tailwind's CSS and base styles from the component are visible, only the CSS custom properties for the background colors are lost.

image

Dev mode:
image

@klickreflex klickreflex added the bug Something isn't working label Jun 7, 2020
@klickreflex
Copy link
Owner Author

It's as if this import doesn't get imported at all on production builds: @import '~vue-slider-component/lib/theme/default.scss';

@klickreflex
Copy link
Owner Author

It doesn't help to copy the source scss out of node_modules into the project's assets: Same result, styles are present at dev runtime and lost on production build.

@klickreflex
Copy link
Owner Author

Might be related: vuejs/vue-cli#4832

@klickreflex
Copy link
Owner Author

klickreflex commented Jun 7, 2020

I've been pulling my hair for more than hour and I'm lost. Do you have an idea what's possibly wrong here, @j6s?

I also tried explicitly en- or disabling CSS extraction, had absolutely no effect (besides a css file being either present or not in the dist bundle, but one without the slider component's styles), the imported scss is always missing in the production build:

// vue.config.js
module.exports = {
    css: {
        extract: false,
    },
};

@helioh3
Copy link

helioh3 commented Oct 10, 2020

I have the same problem with some plugins

@helioh3
Copy link

helioh3 commented Oct 18, 2020

o meu caso, o problema era um plugin do Tailwind esta implementado em meu projeto devido a uma dependecia que o precisava... resolvi removendo ele... algum tree-shaking do purgecss.

@j6s
Copy link
Collaborator

j6s commented Oct 18, 2020

According to google translate:

in my case, the problem was a Tailwind plugin is implemented in my
project due to a dependency that needed it ... I decided to remove it
... some tree-shaking from purgecss.

@helioh3 I'd really appreciate if we'd stick to english here.
Using english as a universally agreed upon language makes projects easier to
approach for everyone. Thanks.

@helioh3
Copy link

helioh3 commented Oct 19, 2020

@j6s sorry, it was automatic ... thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants