Code Monkey home page Code Monkey logo

Comments (7)

Shugaev avatar Shugaev commented on August 19, 2024
import { css } from "docz-plugin-css";
const path = require("path");

export default {
    /* 
        Setting src helps avoid relative path hell for non CSS files. 
        In other words, if you're using "baseUrl" in jsconfig, duplicate path in "src" option
    */
    src: "src",
    plugins: [
        css({
            preprocessor: "sass",
            // cssmodules: true,
            /* 
                src equivalent for your styles
            */
            loaderOpts: {
                includePaths: [path.resolve(__dirname, "src")]
            }
        }),
        /* 
            Finally, you may also need to use plain CSS
        */
        css() 
    ]
};

from docz-plugin-css.

kivervinicius avatar kivervinicius commented on August 19, 2024

:( same here, any soluction?

from docz-plugin-css.

johanazhu avatar johanazhu commented on August 19, 2024

same here

from docz-plugin-css.

avvazana avatar avvazana commented on August 19, 2024

Anyone figure out how to resolve this? I'm able to use .css files, but the moment I switch over to .scss I get a similar error:
Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file

from docz-plugin-css.

kayosouza avatar kayosouza commented on August 19, 2024

Same thing here. Didnt have this issue when running only docz not attached to a real project.

from docz-plugin-css.

trybick avatar trybick commented on August 19, 2024

I believe this plugin docz-plugin-css is only for docz v1. With docz v2 there is a new way:

https://www.docz.site/docs/usage-with-css-preprocessors

from docz-plugin-css.

kayosouza avatar kayosouza commented on August 19, 2024

Just figured out the solution for our team:

We don't use docz:build nor docz:dev if it's a gatsby project. You have to run gatsby develop and the error won't occur. Just set up the route in index.mdx to be on /docs, and everything works. Set up the routes on every .mdx file to be relative to /docs.

If you project isn't build on top of gatsby, this won't work for you. I got this error because i didn't understood the documentation correctly, if your project is built with gatsby you shouldn't run docz commands, just configure the routes on de mdx files properly and it works.

from docz-plugin-css.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.