Skip to content
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

feat: Export a decoupled Sass importer #874

Merged
merged 8 commits into from Aug 24, 2020

Commits on Aug 6, 2020

  1. Copy the full SHA
    16d9762 View commit details
    Browse the repository at this point in the history
  2. feat: export a decoupled version of the Sass importer

    This will be used by `vue-jest` and potentially other projects, to write
    a Jest transform that can adequately mimic `sass-loader`'s behaviour.
    
    Closes webpack-contrib#873
    vvanpo committed Aug 6, 2020
    Copy the full SHA
    9fc94fa View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    b0f9b9a View commit details
    Browse the repository at this point in the history
  4. fix: remove exported importer function

    As discussed in code review, this is more the responsibility of the
    consumer, as `sass-loader/dist/utils.js` already exports all the
    necessary functionality.
    vvanpo committed Aug 6, 2020
    Copy the full SHA
    c649db0 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2020

  1. refactor: remove public annotation from getSassImplementation

    We can reduce our API surface slightly by not considering
    `getSassImplementation` as a public function, and instead using to
    determine defaults from within the only public function in `utils.js`:
    `getWebpackResolver()`.
    vvanpo committed Aug 15, 2020
    Copy the full SHA
    0d59f66 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2020

  1. test: add test suite for getWebpackResolver

    Because `getWebpackResolver` is now part of `utils.js`' public API, we
    should test it separately so that we have some protection against its
    API changing drastically from potential future refactors.
    vvanpo committed Aug 16, 2020
    Copy the full SHA
    18106c3 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    c2dc54d View commit details
    Browse the repository at this point in the history
  3. fix: revert embedding getSassImplementation in getWebpackResolver

    Using `getSassImplementation()` inside the resolver factory is not a
    good idea not only because it means it will be called twice for normal
    usage of the loader, but also because consumers of `getWebpackResolver`
    are almost certainly also calling Sass itself, meaning they'll need to
    use `getSassImplementation()` anyway to make sure they're using the same
    implementation as the resolver thinks is being used.
    vvanpo committed Aug 16, 2020
    Copy the full SHA
    6a93f15 View commit details
    Browse the repository at this point in the history