Skip to content

Commit 8185951

Browse files
committed
Merge branch 'master' into feat/1028-v2
# Conflicts: # src/plugins/index.js
2 parents 1f513e9 + e857d71 commit 8185951

File tree

200 files changed

+53754
-21793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+53754
-21793
lines changed

.eslintrc.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
module.exports = {
22
root: true,
3-
extends: ['@webpack-contrib/eslint-config-webpack', 'prettier'],
3+
extends: ["@webpack-contrib/eslint-config-webpack", "prettier"],
4+
overrides: [
5+
{
6+
files: "src/runtime/**/*",
7+
env: {
8+
browser: true,
9+
},
10+
rules: {
11+
"prefer-destructuring": "off",
12+
"no-param-reassign": "off",
13+
"no-continue": "off",
14+
"no-underscore-dangle": "off",
15+
"no-undefined": "off",
16+
},
17+
},
18+
],
419
};

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
You arrived at this template because you felt none of the other options
88
matched the kind of issue you'd like to report. Please use this opportunity to
9-
tell us about your particular type of issue so we can try to accomodate
9+
tell us about your particular type of issue so we can try to accommodate
1010
similar issues in the future.
1111
1212
PLEASE do note, if you're using this to report an issue already covered by the

.github/ISSUE_TEMPLATE/BUG.md

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,33 @@ name: 🐛 Bug Report
33
about: Something went awry and you'd like to tell us about it.
44
---
55

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

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

13-
👉🏽 Need support, advice, or help? Don't open an issue!
14-
Head to StackOverflow or https://gitter.im/webpack/webpack.
15-
-->
16-
17-
- Operating System:
18-
- Node Version:
19-
- NPM Version:
20-
- webpack Version:
21-
- css-loader Version:
22-
23-
### Expected Behavior
24-
25-
<!-- Remove this section if not reporting a bug or modification request. -->
11+
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
12+
<!-- https://github.com/webpack/webpack/discussions -->
13+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14+
<!-- https://gitter.im/webpack/webpack -->
15+
<!-- Issues which contain questions or support requests will be closed. -->
2616

2717
### Actual Behavior
2818

29-
<!-- Remove this section if not reporting a bug or modification request. -->
30-
31-
### Code
19+
<!-- Explain exactly how it behave -->
3220

33-
```js
34-
// webpack.config.js
35-
// If your code blocks are over 20 lines, please paste a link to a gist
36-
// (https://gist.github.com).
37-
```
21+
### Expected Behavior
3822

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

4326
### How Do We Reproduce?
4427

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

48-
If your webpack config is over 50 lines long, please provide a URL to a repo
49-
for your beefy 🍖 app that we can use to reproduce.
50-
-->
35+
### Please paste the results of `npx webpack-cli info` here, and mention other relevant information

.github/ISSUE_TEMPLATE/DOCS.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,8 @@ name: 📚 Documentation
33
about: Are the docs lacking or missing something? Do they need some new 🔥 hotness? Tell us here.
44
---
55

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

179
Documentation Is:
1810

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

2618
### Please Explain in Detail...
2719

20+
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
21+
<!-- https://github.com/webpack/webpack/discussions -->
22+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
23+
<!-- https://gitter.im/webpack/webpack -->
24+
<!-- Issues which contain questions or support requests will be closed. -->
25+
2826
### Your Proposal for Changes

.github/ISSUE_TEMPLATE/FEATURE.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,17 @@ name: ✨ Feature Request
33
about: Suggest an idea for this project
44
---
55

6-
<!--
7-
Issues are so 🔥
8-
9-
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
10-
of Github will appear and pile-drive the close button from a great height
11-
while making animal noises.
12-
13-
👉🏽 Need support, advice, or help? Don't open an issue!
14-
Head to StackOverflow or https://gitter.im/webpack/webpack.
15-
-->
16-
17-
- Operating System:
18-
- Node Version:
19-
- NPM Version:
20-
- webpack Version:
21-
- css-loader Version:
6+
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
7+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
228

239
### Feature Proposal
2410

11+
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
12+
<!-- https://github.com/webpack/webpack/discussions -->
13+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14+
<!-- https://gitter.im/webpack/webpack -->
15+
<!-- Issues which contain questions or support requests will be closed. -->
16+
2517
### Feature Use Case
18+
19+
### Please paste the results of `npx webpack-cli info` here, and mention other relevant information

.github/ISSUE_TEMPLATE/MODIFICATION.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,19 @@ name: 🔧 Modification Request
33
about: Would you like something work differently? Have an alternative approach? This is the template for you.
44
---
55

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

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

17-
- Operating System:
18-
- Node Version:
19-
- NPM Version:
20-
- webpack Version:
21-
- css-loader Version:
11+
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
12+
<!-- https://github.com/webpack/webpack/discussions -->
13+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14+
<!-- https://gitter.im/webpack/webpack -->
15+
<!-- Issues which contain questions or support requests will be closed. -->
2216

2317
### Expected Behavior / Situation
2418

2519
### Actual Behavior / Situation
2620

27-
### Modification Proposal
21+
### Please paste the results of `npx webpack-cli info` here, and mention other relevant information

.github/ISSUE_TEMPLATE/SUPPORT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: 🆘 Support, Help, and Advice
3-
about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to StackOverflow or https://gitter.im/webpack/webpack.
3+
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.
44
---
55

66
Hey there! If you need support, help, or advice then this is not the place to ask.
7-
Please visit [StackOverflow](https://stackoverflow.com/questions/tagged/webpack)
7+
Please visit [Discussions](https://github.com/webpack/webpack/discussions), [StackOverflow](https://stackoverflow.com/questions/tagged/webpack)
88
or [the Webpack Gitter](https://gitter.im/webpack/webpack) instead.

.github/workflows/nodejs.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ jobs:
2929
with:
3030
fetch-depth: 0
3131

32-
- name: Use Node.js ${{ env.node-version }}
33-
uses: actions/setup-node@v1
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v2
3434
with:
35-
node-version: ${{ env.node-version }}
35+
node-version: ${{ matrix.node-version }}
36+
cache: "npm"
3637

3738
- name: Use latest NPM
3839
run: sudo npm i -g npm
@@ -43,20 +44,20 @@ jobs:
4344
- name: Lint
4445
run: npm run lint
4546

46-
# - name: Security audit
47-
# run: npm run security
47+
- name: Security audit
48+
run: npm run security
4849

4950
- name: Check commit message
50-
uses: wagoid/commitlint-github-action@v1
51+
uses: wagoid/commitlint-github-action@v4
5152

5253
test:
5354
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
5455

5556
strategy:
5657
matrix:
5758
os: [ubuntu-latest, windows-latest, macos-latest]
58-
node-version: [10.x, 12.x, 14.x]
59-
webpack-version: [latest, next]
59+
node-version: [12.x, 14.x, 16.x, 17.x]
60+
webpack-version: [latest]
6061

6162
runs-on: ${{ matrix.os }}
6263

@@ -68,9 +69,10 @@ jobs:
6869
- uses: actions/checkout@v2
6970

7071
- name: Use Node.js ${{ matrix.node-version }}
71-
uses: actions/setup-node@v1
72+
uses: actions/setup-node@v2
7273
with:
7374
node-version: ${{ matrix.node-version }}
75+
cache: "npm"
7476

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

9294
- name: Submit coverage data to codecov
93-
uses: codecov/codecov-action@v1
95+
uses: codecov/codecov-action@v2
9496
with:
9597
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ npm-debug.log*
88
/local
99
/reports
1010
/node_modules
11+
/test/outputs
1112
/test/fixtures/import/import-absolute.css
1213
/test/fixtures/url/url-absolute.css
1314
/test/fixtures/modules/composes/composes-absolute.css
15+
/test/fixtures/import/import-file-protocol.css
16+
/test/fixtures/url/url-file-protocol.css
1417

1518
.DS_Store
1619
Thumbs.db

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install lint-staged

.prettierrc.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)