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

Importing styles doesn't work with Postcss #3

Closed
abattenburg opened this issue Jan 17, 2018 · 4 comments
Closed

Importing styles doesn't work with Postcss #3

abattenburg opened this issue Jan 17, 2018 · 4 comments

Comments

@abattenburg
Copy link

First off, thank you for your work with this library. Exactly the sort of solution I was hoping for.

I've figured out a way around this, but for future users importing styles with import 'nuxt-dropzone/dropzone.css' doesn't work if you're using postcss. As a work around I copied the styles directly from here and pasted them into my styles globally (not scoped). Not the most elegant, but I thought I would document it in case someone else runs into this problem.

@saeta-eth
Copy link

I had the same problem and I spent a whole day try to solve it.
Your comments were really useful, thanks @abattenburg

@Etheryte
Copy link
Owner

Etheryte commented Feb 28, 2018

I've added a link to this thread in the project readme under "Common issues" so others can find it more easily in the future. Since I'm not that familiar with PostCSS, I'm not going to work on a universal fix myself, but PRs are welcome.

@Pitu
Copy link

Pitu commented May 20, 2018

@abattenburg your comment saved me a lot of trouble! Additionally, creating a new stylesheet file with the contents of the package's css rules also works!

import Dropzone from 'nuxt-dropzone';
import '../styles/dropzone.scss';

@MartinMuzatko
Copy link

If you don't want to create files, you can also load the css file directly. Since vue2-dropzone is a dependency of nuxt-dropzone, this works without problems:

<script>
import Dropzone from 'nuxt-dropzone';
import 'vue2-dropzone/dist/vue2Dropzone.css'

export default {
    components: { Dropzone },
    // ...
}
</script>

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

No branches or pull requests

5 participants