Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webpack-contrib/style-loader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.2.1
Choose a base ref
...
head repository: webpack-contrib/style-loader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.3.0
Choose a head ref
  • 13 commits
  • 38 files changed
  • 6 contributors

Commits on Jul 24, 2021

  1. ci: setup npm cache (#529)

    snitin315 authored Jul 24, 2021
    Copy the full SHA
    5ebdc5f View commit details

Commits on Aug 4, 2021

  1. Copy the full SHA
    13b43d6 View commit details

Commits on Aug 6, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    d45b55a View commit details

Commits on Aug 18, 2021

  1. docs: update README (#533)

    gesposito authored Aug 18, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    2c247e2 View commit details

Commits on Aug 30, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b21d81a View commit details

Commits on Sep 14, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f8ef63b View commit details
  2. chore(deps): update

    alexander-akait authored Sep 14, 2021
    Copy the full SHA
    caf66a0 View commit details
  3. refactor: code

    alexander-akait authored Sep 14, 2021
    Copy the full SHA
    cdf0ba7 View commit details

Commits on Sep 18, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    74fa1cf View commit details

Commits on Sep 20, 2021

  1. Copy the full SHA
    b9a600c View commit details

Commits on Sep 21, 2021

  1. Copy the full SHA
    43bede4 View commit details
  2. test: update (#542)

    alexander-akait authored Sep 21, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    b47718a View commit details
  3. chore(release): 3.3.0

    alexander-akait committed Sep 21, 2021

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    c799ecc View commit details
Showing with 4,805 additions and 9,118 deletions.
  1. +19 −34 .github/ISSUE_TEMPLATE/BUG.md
  2. +8 −10 .github/ISSUE_TEMPLATE/DOCS.md
  3. +10 −16 .github/ISSUE_TEMPLATE/FEATURE.md
  4. +9 −15 .github/ISSUE_TEMPLATE/MODIFICATION.md
  5. +2 −2 .github/ISSUE_TEMPLATE/SUPPORT.md
  6. +4 −2 .github/workflows/nodejs.yml
  7. +8 −0 CHANGELOG.md
  8. +170 −2 README.md
  9. +3,565 −8,347 package-lock.json
  10. +7 −7 package.json
  11. +3 −1 src/index.js
  12. +7 −7 src/runtime/injectStylesIntoLinkTag.js
  13. +26 −16 src/runtime/injectStylesIntoStyleTag.js
  14. +4 −5 src/runtime/insertStyleElement.js
  15. +2 −2 src/runtime/setAttributesWithAttributes.js
  16. +2 −2 src/runtime/setAttributesWithAttributesAndNonce.js
  17. +2 −2 src/runtime/setAttributesWithoutAttributes.js
  18. +45 −15 src/runtime/singletonStyleDomAPI.js
  19. +37 −15 src/runtime/styleDomAPI.js
  20. +6 −6 src/runtime/styleTagTransform.js
  21. +558 −558 test/__snapshots__/esModule-option.test.js.snap
  22. +63 −0 test/__snapshots__/lazyStyleTag-options.test.js.snap
  23. +24 −24 test/__snapshots__/loader.test.js.snap
  24. +8 −0 test/fixtures/lazy-options-use-unuse.js
  25. +7 −0 test/fixtures/lazy-options.js
  26. +73 −0 test/lazyStyleTag-options.test.js
  27. +2 −0 test/loader.test.js
  28. +9 −1 test/manual/index.html
  29. +7 −0 test/manual/src/bottom.css
  30. +2 −2 test/manual/src/{custom-square.lazy.css → custom-square.custom.css}
  31. +11 −11 test/manual/src/custom-square.js
  32. +1 −0 test/manual/src/index.js
  33. +11 −0 test/manual/src/middle.css
  34. +0 −5 test/manual/src/style.css
  35. +10 −0 test/manual/src/top.css
  36. +30 −2 test/manual/webpack.config.js
  37. +15 −9 test/runtime/__snapshots__/injectStylesIntoStyleTag.test.js.snap
  38. +38 −0 test/runtime/injectStylesIntoStyleTag.test.js
53 changes: 19 additions & 34 deletions .github/ISSUE_TEMPLATE/BUG.md
Original file line number Diff line number Diff line change
@@ -3,48 +3,33 @@ name: 🐛 Bug Report
about: Something went awry and you'd like to tell us about it.
---

<!--
Issues are so 🔥
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

If you remove or skip this template, you'll make the 🐼 sad and the mighty god
of Github will appear and pile-drive the close button from a great height
while making animal noises.
### Bug report

👉🏽 Need support, advice, or help? Don't open an issue!
Head to StackOverflow or https://gitter.im/webpack/webpack.
-->

- Operating System:
- Node Version:
- NPM Version:
- webpack Version:
- style-loader Version:

### Expected Behavior

<!-- Remove this section if not reporting a bug or modification request. -->
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
<!-- https://github.com/webpack/webpack/discussions -->
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
<!-- https://gitter.im/webpack/webpack -->
<!-- Issues which contain questions or support requests will be closed. -->

### Actual Behavior

<!-- Remove this section if not reporting a bug or modification request. -->

### Code
<!-- Explain exactly how it behave -->

```js
// webpack.config.js
// If your code blocks are over 20 lines, please paste a link to a gist
// (https://gist.github.com).
```
### Expected Behavior

```js
// additional code, HEY YO remove this block if you don't need it
```
<!-- "It should work" is not a helpful explanation -->
<!-- Explain exactly how it should behave -->

### How Do We Reproduce?

<!--
Remove this section if not reporting a bug.
<!-- A great way to do this is to provide your configuration via a GitHub repository -->
<!-- The most helpful is a minimal reproduction with instructions on how to reproduce -->
<!-- Repositories with too many files or large `webpack.config.js` files are not suitable -->
<!-- Please only add small code snippets directly into this issue -->
<!-- https://gist.github.com is a good place for longer code snippets -->
<!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead -->

If your webpack config is over 50 lines long, please provide a URL to a repo
for your beefy 🍖 app that we can use to reproduce.
-->
### Please paste the results of `npx webpack-cli info` here, and mention other relevant information
18 changes: 8 additions & 10 deletions .github/ISSUE_TEMPLATE/DOCS.md
Original file line number Diff line number Diff line change
@@ -3,16 +3,8 @@ name: 📚 Documentation
about: Are the docs lacking or missing something? Do they need some new 🔥 hotness? Tell us here.
---

<!--
Issues are so 🔥
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
of Github will appear and pile-drive the close button from a great height
while making animal noises.
👉🏽 Need support, advice, or help? Don't open an issue!
Head to StackOverflow or https://gitter.im/webpack/webpack.
-->
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

Documentation Is:

@@ -25,4 +17,10 @@ Documentation Is:

### Please Explain in Detail...

<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- https://github.com/webpack/webpack/discussions -->
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
<!-- https://gitter.im/webpack/webpack -->
<!-- Issues which contain questions or support requests will be closed. -->

### Your Proposal for Changes
26 changes: 10 additions & 16 deletions .github/ISSUE_TEMPLATE/FEATURE.md
Original file line number Diff line number Diff line change
@@ -3,23 +3,17 @@ name: ✨ Feature Request
about: Suggest an idea for this project
---

<!--
Issues are so 🔥
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
of Github will appear and pile-drive the close button from a great height
while making animal noises.
👉🏽 Need support, advice, or help? Don't open an issue!
Head to StackOverflow or https://gitter.im/webpack/webpack.
-->

- Operating System:
- Node Version:
- NPM Version:
- webpack Version:
- style-loader Version:
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

### Feature Proposal

<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
<!-- https://github.com/webpack/webpack/discussions -->
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
<!-- https://gitter.im/webpack/webpack -->
<!-- Issues which contain questions or support requests will be closed. -->

### Feature Use Case

### Please paste the results of `npx webpack-cli info` here, and mention other relevant information
24 changes: 9 additions & 15 deletions .github/ISSUE_TEMPLATE/MODIFICATION.md
Original file line number Diff line number Diff line change
@@ -3,25 +3,19 @@ name: 🔧 Modification Request
about: Would you like something work differently? Have an alternative approach? This is the template for you.
---

<!--
Issues are so 🔥
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->

If you remove or skip this template, you'll make the 🐼 sad and the mighty god
of Github will appear and pile-drive the close button from a great height
while making animal noises.
👉🏽 Need support, advice, or help? Don't open an issue!
Head to StackOverflow or https://gitter.im/webpack/webpack.
-->
### Modification Proposal

- Operating System:
- Node Version:
- NPM Version:
- webpack Version:
- style-loader Version:
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
<!-- https://github.com/webpack/webpack/discussions -->
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
<!-- https://gitter.im/webpack/webpack -->
<!-- Issues which contain questions or support requests will be closed. -->

### Expected Behavior / Situation

### Actual Behavior / Situation

### Modification Proposal
### Please paste the results of `npx webpack-cli info` here, and mention other relevant information
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: 🆘 Support, Help, and Advice
about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to StackOverflow or https://gitter.im/webpack/webpack.
about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to https://github.com/webpack/webpack/discussions, StackOverflow or https://gitter.im/webpack/webpack.
---

Hey there! If you need support, help, or advice then this is not the place to ask.
Please visit [StackOverflow](https://stackoverflow.com/questions/tagged/webpack)
Please visit [Discussions](https://github.com/webpack/webpack/discussions), [StackOverflow](https://stackoverflow.com/questions/tagged/webpack)
or [the Webpack Gitter](https://gitter.im/webpack/webpack) instead.
6 changes: 4 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Use latest NPM
run: sudo npm i -g npm
@@ -47,7 +48,7 @@ jobs:
run: npm run security

- name: Check commit message
uses: wagoid/commitlint-github-action@v1
uses: wagoid/commitlint-github-action@v4

test:
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
@@ -71,6 +72,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Use latest NPM on ubuntu/macos
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
@@ -90,6 +92,6 @@ jobs:
run: npm run test:coverage -- --ci

- name: Submit coverage data to codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [3.3.0](https://github.com/webpack-contrib/style-loader/compare/v3.2.1...v3.3.0) (2021-09-21)


### Features

* added support for `supports()`, `layer()` and `media` from `@import` at-rules ([b9a600c](https://github.com/webpack-contrib/style-loader/commit/b9a600c87aa3f68caabcaa80f0a1c340e739e30e))
* allow to pass options to `insert` function through `style.use()` ([#535](https://github.com/webpack-contrib/style-loader/issues/535)) ([f8ef63b](https://github.com/webpack-contrib/style-loader/commit/f8ef63b86a603232395f7708c508d6c3b639e92d))

### [3.2.1](https://github.com/webpack-contrib/style-loader/compare/v3.2.0...v3.2.1) (2021-07-20)


Loading