Comments (1)
Ok, so somehow the bug was between my monitor and my chair.
Here's what I have for future reference of anyone coming here from google.
// my folder structure
src/
app/
styles
I'm not using any of webpack's alias/resolver stuff, I'm only using .babelrc
to resolve my javascript imports and some options on the sass-loader.
// .babelrc
(...)
"plugins": [
["module-resolver", {
"root": ["./src"],
"alias": {
"app": "./src/app"
}
}]
],
(...)
// webpack.config.js
(...)
module: {
rules: [
{
test: /\.(sa|sc|c)ss$/,
use: [
'style-loader',
'css-loader',
{
loader: 'sass-loader',
options: {
includePaths: [path.resolve(PATH_SOURCE)],
},
},
],
}
]
}
(...)
The above solves my webpack build, but we need to help docz too.
// doczrc.js
const PATH_SOURCE = path.join(process.cwd(), 'src');
export default {
plugins: [
css({
preprocessor: 'sass',
loaderOpts: {
includePaths: [path.resolve(PATH_SOURCE)],
},
}),
],
};
Now the @import app/styles/variables
is able to grab my $properties and display them correctly on the components.
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
- Handling Sass Imports HOT 7
- 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.