Comments (7)
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.
:( same here, any soluction?
from docz-plugin-css.
same here
from docz-plugin-css.
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.
Same thing here. Didnt have this issue when running only docz not attached to a real project.
from docz-plugin-css.
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.
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)
- CSS Modules is forced even without `.module` extension HOT 1
- Cannot use with docz-core 0.12.x HOT 2
- Using Global CSS HOT 2
- Is there any plan to update css-loader to v2 ?
- Cannot compile CSS file HOT 1
- ruleOpts not published in package?
- less: nested-rules is't work HOT 1
- Create-React-App v2 and this package are conflicting due to Webpack version HOT 4
- Cannot handle .pcss extension HOT 2
- Bug with React Scripts HOT 4
- installed this plugin; errors immediately when running the site HOT 7
- Cannot output any css when build docz HOT 3
- SplitChunks plugin test condition always returning false
- This plugin is only for docz v1 and breaks docz v2 HOT 1
- TypeError: setArgs is not a function HOT 6
- Unexpected character '@'
- Is there a way for docz to auto recognize file as either css module or normal css without adding `.module` to the file? HOT 1
- Make heavy dependencies as peer dependencies
- Unparseable filetype scss HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docz-plugin-css.