-
Notifications
You must be signed in to change notification settings - Fork 25
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
fix: css imports with extension were not bundled in output. #55
Conversation
src/bundler.ts
Outdated
@@ -8,7 +8,8 @@ import * as Helpers from "./helpers"; | |||
const IMPORT_PATTERN = /@import\s+['"](.+)['"];/g; | |||
const COMMENT_PATTERN = /\/\/.*$/gm; | |||
const MULTILINE_COMMENT_PATTERN = /\/\*[\s\S]*?\*\//g; | |||
const FILE_EXTENSION = ".scss"; | |||
const DEFAULT_FILE_EXTENSION = ".scss"; | |||
const ALLOWED_FILE_EXTENSIONS = [".scss", ".saas", ".css"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it really work with .sass
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried https://www.sassmeister.com/ with this snippet and I failed:
.test {
color: red;
}
nav
ul
margin: 0
padding: 0
list-style: none
li
display: inline-block
a
display: block
padding: 6px 12px
text-decoration: none
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting to resolve comments.
Good catch. I just renamed a scss file and tested 😞 Dropped the saas from allowed extension list now. |
It was a typo, it used to say |
@lazarljubenovic What do you mean? |
@lazarljubenovic I just tested this will not work with @MartynasZilinskas Please move ahead with merge. |
🎉 |
v2.4.0 is released 😄. |
The PR fixes #48 by looking for valid extensions before attaching default extension.
I used tar-ball of this PR and fixed #48 in a branch
git clone -b issue/48 https://github.com/arpit-agarwal/scss-bundle-issues.git
run npm install && npm start.
Theme file is generated as expected on destination location