Comments (4)
Hi @bricebou I need to check why this is happening for this specific case.
Most likely the it an issue with sass-loader or encore or both, not sure yet.
I will first do a test, when I have time, of a clean install with just webpack and sass-loader
If this still works I will try using the full case, with encore.
The issue on top is error from sass-loader that it can not find @use "@fylgja/mq/helper"
, this error normally always relates to that the relative path is not set for /node_modules/
.
See the Sass docs for load-path
:
- https://sass-lang.com/documentation/cli/dart-sass#load-path
- https://sass-lang.com/documentation/js-api/interfaces/Options#loadPaths
This weird since your own imports are using the relative path node_modules
.
so this clearly a error somewhere and needs a bit of testing why.
from fylgja.
Thanks a lot ! I'll stay available if you need me to send more logs or test more :)
from fylgja.
Hi @bricebou, I believe I may have found a solution to your issue. It appears that you need to set the include path to ensure that all node relative paths are handled correctly when using sass-loader.
The problem seems to be related to how sass-loader handles imports from node_modules. In both cases that I tested (with Webpack and Encore), passing includePaths: ["node_modules"]
was necessary, just like when using sass directly.
To fix your issue, please add the following code to your configuration:
const Encore = require('@symfony/webpack-encore');
// Other Encore options
Encore
// Other Encore options
.enableSassLoader((options) => {
options.sassOptions = {
includePaths: ["node_modules"],
};
}, {})
;
module.exports = Encore.getWebpackConfig();
Thank you for bringing this issue to my attention. I have also created a repository specifically for JS bundler cases like this, which you can find at fylgja/examples. I will add more options there later 😉.
from fylgja.
Great, thanks a lot @GrimLink ! I'll try that as soon as I can :-)
from fylgja.
Related Issues (20)
- bug: Inner positioned element stays visable after close
- bug @import layer syntax will use scss version HOT 2
- bug missing radius unset on offcanvas style in dailog HOT 1
- feature beter design tokens/CSS props HOT 2
- feature: remove nowrap from badge
- bug: details only shows animation only when opening the first time HOT 1
- feature add `@layer` support to all components HOT 1
- feature add shadow dom support to all token components
- feature add the block default behavior for images HOT 1
- feature convert Aspect Ratio to a CSS token pkg
- feature move CSS utilities back to utilpack and transform these Fylgja Components to Tokens Components
- feature use component based import option for each CSS utility
- Bug: Simplify layer import syntax for v1.3
- Feature: drop SCSS variable prefixes in components
- Feature: cleanup each component from older variables and import options
- Feature: add more color options to CSS color props, like oklch HOT 5
- Bug: The dialog doesn't close evertime when i am on firefox HOT 1
- Bug: setting scss variables with the Fylgja Theme does not affect any styles for the base component
- Bug: importing CSS props with postcss will throw error for: missed semicolon HOT 2
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 fylgja.