-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Can't find stylesheet to import. #801
Comments
actually, the If I remove this tilde from my import and include transformedCss = sass
.renderSync({
data: css,
includePaths: [
filePath,
'node_modules'
],
})
.css.toString(); |
but how in dart-sass by https://www.npmjs.com/package/node-sass-package-importer using cli method |
@danny007in Try using
|
@zaydek unfortunately that doesn't work, because the '~' is not stripped. |
u need to remove |
Yes I know, but it would be nice if dart sass could follow the webpack scheme here, because the In node sass it was possible to use a custom importer using the |
@sattes-faction create new issue for that |
Has an issue been created for this?. I have had to use the tilde-sass package to get around this. |
@mdownes I also tried to use that node-sass-tilde-importer package but couldn't get it to work. What does your cli syntax look like, if you don't mind? |
I just added this to my package.json “Build:sass”:”tilde-sass —file src/styles.scss —outfile dist/“ My styles.scss looked something like this: @use “~/somedirectory/somefile.scss” |
I have a sass file that imports a file from
node_modules
using the tilde prefix:When I try and run this using
renderSync
I get the following error:This works when I use the sass-loader and webpack to parse the files like this.
I am trying to fix a bug in typescript-plugin-css-modules which uses sass-dart and I would be interested to know if sass-dart supports tilde imports?
I have a failing test which you can reproduce like this:
The test file is here and the fixture it uses here
The text was updated successfully, but these errors were encountered: