-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
chore(core): allow advanced scss import #4207
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #4207 +/- ##
=======================================
Coverage 99.86% 99.86%
=======================================
Files 237 237
Lines 4525 4525
Branches 1274 1274
=======================================
Hits 4519 4519
Misses 5 5
Partials 1 1 Continue to review full report at Codecov.
|
@madflow have you tested with other module bundlers? Some people use Parcel or other bundlers |
I only mentioned Webpack because the docs currently state:
I have done a quick test with Parcel now: It does not seem to work like Webpacks But both Bundlers understand:
The Rollup plugin land is too confusing for me. I only found https://github.com/thgh/rollup-plugin-scss and they show how to import a Maybe amend the docs and clearly state that Bundlers can behave differently and that the above is Webpack + sass-loader use case? |
Yeah, maybe a note about referring to the respective bundler's import name resolution? |
6341d29
to
1a982ef
Compare
O.K. I changed the docs and rebased - left the initial part basically as it was, and added examples for Webpack and Parcel. Rollup remains dark magic. I did not go into detail how module paths are resolved because this would add unnecessary complexity (imho) - and in Webpack's case is really complex... |
1a982ef
to
ed79c07
Compare
Updated Prettier, ran Prettier, rebased. |
Describe the PR
This PR allows importing the sass index file via
This is aligned with the
sass-loader
documentation:https://github.com/webpack-contrib/sass-loader#resolving-import-at-rules
and how Bootstrap enables this feature:
https://github.com/twbs/bootstrap/blob/60559d44a2166708a4dc2f6ccb835052da08ab65/package.json#L74
Hardcoding
node_modules
is not necessary, since Webpack is needed here anyway and thesass-loader
takes care of the module resolution.PR checklist
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
dev
branch, not themaster
branch[...] (fixes #xxx[,#xxx])
, where "xxx" is the issue number)fix(alert): not alerting during SSR render
,docs(badge): update pill examples, fix typos
,chore: fix typo in README
, etc). This is very important, as theCHANGELOG
is generated from these messages.If new features/enhancement/fixes are added or changed:
package.json
for slot and event changes)If adding a new feature, or changing the functionality of an existing feature, the PR's
description above includes: