2

I have a newly generated vue-cli project. I've installed the Pure.CSS framework using npm install purecss --save. But I cannot figure out how to integrate, import or load the css framework into my project. I don't even know where in the project I should keep my usual css (mystyle.css etc.) files. I am guessing it should be inside the src/assets directory. Here is the vue-cli Project Structure.

How can I bundle all the css files in a single file, such as app.css or main.css?

1 Answer 1

1

You can import it as any other resource by:

import '../node_modules/purecss/path/to/css/file.css'

in your App.vue for instance.

Ensure the path to node_modules is correct.

Then you're ready to use purecss styles anywhere in your templates.

Sign up to request clarification or add additional context in comments.

1 Comment

Proper statement is import '../node_modules/purecss/build/pure-min.css'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.