Skip to content

Commit cbcfbc5

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feature/disable_async_20190719
# Conflicts: # README.md # azure-pipelines.yml # package-lock.json # package.json # src/index.js # src/loader.js # test/TestCases.test.js # test/helpers/getCompiler.js # test/helpers/index.js # test/manual/webpack.config.js
2 parents f0358d0 + b146549 commit cbcfbc5

File tree

15 files changed

+3251
-3000
lines changed

15 files changed

+3251
-3000
lines changed

.github/workflows/nodejs.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: mini-css-extract-plugin
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- next
8+
pull_request:
9+
branches:
10+
- master
11+
- next
12+
13+
jobs:
14+
lint:
15+
name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }}
16+
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
20+
strategy:
21+
matrix:
22+
os: [ubuntu-latest]
23+
node-version: [12.x]
24+
25+
runs-on: ${{ matrix.os }}
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Use Node.js ${{ env.node-version }}
33+
uses: actions/setup-node@v1
34+
with:
35+
node-version: ${{ env.node-version }}
36+
37+
- name: Use latest NPM
38+
run: sudo npm i -g npm
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Lint
44+
run: npm run lint
45+
46+
# - name: Security audit
47+
# run: npm run security
48+
49+
- name: Check commit message
50+
uses: wagoid/commitlint-github-action@v1
51+
52+
test:
53+
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
54+
55+
strategy:
56+
matrix:
57+
os: [ubuntu-latest, windows-latest, macos-latest]
58+
# css-loader doesn't support node@6
59+
node-version: [8.x, 10.x, 12.x, 14.x]
60+
webpack-version: [latest, next]
61+
exclude:
62+
# Webpack 5 does not support node 6 and 8
63+
- node-version: 8.x
64+
webpack-version: next
65+
66+
runs-on: ${{ matrix.os }}
67+
68+
steps:
69+
- name: Setup Git
70+
if: matrix.os == 'windows-latest'
71+
run: git config --global core.autocrlf input
72+
73+
- uses: actions/checkout@v2
74+
75+
- name: Use Node.js ${{ matrix.node-version }}
76+
uses: actions/setup-node@v1
77+
with:
78+
node-version: ${{ matrix.node-version }}
79+
80+
- name: Use latest NPM on ubuntu/macos
81+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
82+
run: sudo npm i -g npm
83+
84+
- name: Use latest NPM on windows
85+
if: matrix.os == 'windows-latest'
86+
run: npm i -g npm
87+
88+
- name: Install dependencies
89+
run: npm i
90+
91+
- name: Install webpack ${{ matrix.webpack-version }}
92+
run: npm i webpack@${{ matrix.webpack-version }}
93+
94+
- name: Run tests for webpack version ${{ matrix.webpack-version }}
95+
run: npm run test:coverage -- --ci
96+
97+
- name: Submit coverage data to codecov
98+
uses: codecov/codecov-action@v1
99+
with:
100+
token: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ When inlining CSS `data-href` must be used.
402402

403403
### Extracting all CSS in a single file
404404

405-
Similar to what [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) does, the CSS can be extracted in one CSS file using `optimization.splitChunks.cacheGroups`.
405+
The CSS can be extracted in one CSS file using `optimization.splitChunks.cacheGroups`.
406406

407407
**webpack.config.js**
408408

@@ -514,7 +514,7 @@ const miniCssExtractPlugin = new MiniCssExtractPlugin({
514514
});
515515
```
516516

517-
### Module Filename Option
517+
#### Module Filename Option
518518

519519
With the `moduleFilename` option you can use chunk data to customize the filename. This is particularly useful when dealing with multiple entry points and wanting to get more control out of the filename for a given entry point/chunk. In the example below, we'll use `moduleFilename` to output the generated css into a different directory.
520520

@@ -616,11 +616,11 @@ Please take a moment to read our contributing guidelines if you haven't yet done
616616
[node-url]: https://nodejs.org
617617
[deps]: https://david-dm.org/webpack-contrib/mini-css-extract-plugin.svg
618618
[deps-url]: https://david-dm.org/webpack-contrib/mini-css-extract-plugin
619-
[tests]: https://dev.azure.com/webpack-contrib/mini-css-extract-plugin/_apis/build/status/webpack-contrib.mini-css-extract-plugin?branchName=master
620-
[tests-url]: https://dev.azure.com/webpack-contrib/mini-css-extract-plugin/_build/latest?definitionId=6&branchName=master
619+
[tests]: https://github.com/webpack-contrib/mini-css-extract-plugin/workflows/mini-css-extract-plugin/badge.svg
620+
[tests-url]: https://github.com/webpack-contrib/mini-css-extract-plugin/actions
621621
[cover]: https://codecov.io/gh/webpack-contrib/mini-css-extract-plugin/branch/master/graph/badge.svg
622622
[cover-url]: https://codecov.io/gh/webpack-contrib/mini-css-extract-plugin
623-
[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
623+
[chat]: https://badges.gitter.im/webpack/webpack.svg
624624
[chat-url]: https://gitter.im/webpack/webpack
625625
[size]: https://packagephobia.now.sh/badge?p=mini-css-extract-plugin
626626
[size-url]: https://packagephobia.now.sh/result?p=mini-css-extract-plugin

azure-pipelines.yml

Lines changed: 0 additions & 207 deletions
This file was deleted.

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ module.exports = {
22
testURL: 'http://localhost/',
33
transformIgnorePatterns: ['/node_modules/', '<rootDir>/dist/'],
44
watchPathIgnorePatterns: ['<rootDir>/test/js'],
5+
setupFilesAfterEnv: ['<rootDir>/setupTest.js'],
56
};

0 commit comments

Comments
 (0)