diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 84e3fc3f..00000000 --- a/.babelrc +++ /dev/null @@ -1,35 +0,0 @@ -{ - "presets": [ - [ - "env", - { - "useBuiltIns": true, - "targets": { - "node": "6.11.5" - }, - "exclude": [ - "transform-async-to-generator", - "transform-regenerator" - ] - } - ] - ], - "plugins": [ - [ - "transform-object-rest-spread", - { - "useBuiltIns": true - } - ] - ], - "env": { - "test": { - "presets": [ - "env" - ], - "plugins": [ - "transform-object-rest-spread" - ] - } - } -} diff --git a/.cspell.json b/.cspell.json new file mode 100644 index 00000000..89d901e5 --- /dev/null +++ b/.cspell.json @@ -0,0 +1,52 @@ +{ + "version": "0.2", + "language": "en,en-gb", + "words": [ + "publicpath", + "memfs", + "crossorigin", + "Crossorigin", + "camelcase", + "unreload", + "cnfg", + "sorhus", + "sindre", + "staticc", + "deepc", + "pathinfo", + "iife", + "IIFE", + "fullhref", + "Unexception", + "fullhash", + "truetype", + "entrypoints", + "plusplus", + "hotreloading", + "chunkhash", + "concat", + "nosources", + "hspace", + "vspace", + "commitlint", + "unreload", + "cnfg", + "tapable" + ], + + "ignorePaths": [ + "CHANGELOG.md", + "package.json", + "dist/**", + "**/__snapshots__/**", + "package-lock.json", + "/test/js", + "/test/outputs", + "/test/cases", + "/test/fixtures", + "/test/manual/dist", + "node_modules", + "coverage", + "*.log" + ] +} diff --git a/.editorconfig b/.editorconfig index 28e1806f..5f795282 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,5 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true -[.md] -insert_final_newline = false +[*.md] trim_trailing_whitespace = false diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 6df4bd28..00000000 --- a/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -/node_modules -/dist -/test/cases -/test/js -/test/manual diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 47655ae0..00000000 --- a/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "webpack", - "rules": { - "class-methods-use-this": "off", - "no-undefined": "off" - } -} diff --git a/.gitattributes b/.gitattributes index 9d37df8f..c76f8a99 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,4 @@ package-lock.json -diff * text=auto test/cases/* eol=lf bin/* eol=lf +yarn.lock -diff diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 4601e185..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index cadb1bf4..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 00000000..8caf799d --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,14 @@ +name: "Dependency Review" +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: "Checkout Repository" + uses: actions/checkout@v4 + - name: "Dependency Review" + uses: actions/dependency-review-action@v4 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 00000000..038004c6 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,177 @@ +name: mini-css-extract-plugin + +on: + push: + branches: + - main + - next + pull_request: + branches: + - main + - next + +permissions: + contents: read + +jobs: + lint: + name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }} + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [lts/*] + + runs-on: ${{ matrix.os }} + + concurrency: + group: lint-${{ matrix.os }}-v${{ matrix.node-version }}-${{ github.ref }} + cancel-in-progress: true + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint + + - name: Build types + run: npm run build:types + + - name: Check types + run: if [ -n "$(git status types --porcelain)" ]; then echo "Missing types. Update types by running 'npm run build:types'"; exit 1; else echo "All types are valid"; fi + + - name: Security audit + run: npm run security + + - name: Validate PR commits with commitlint + if: github.event_name == 'pull_request' + run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose + + test: + name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: [12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 24.x] + webpack-version: [latest] + + runs-on: ${{ matrix.os }} + + concurrency: + group: test-${{ matrix.os }}-v${{ matrix.node-version }}-${{ matrix.webpack-version }}-${{ github.ref }} + cancel-in-progress: true + + steps: + - name: Setup Git + if: matrix.os == 'windows-latest' + run: git config --global core.autocrlf input + + - uses: actions/checkout@v4 + - uses: actions/github-script@v7 + id: calculate_architecture + with: + result-encoding: string + script: | + if ('${{ matrix.os }}' === 'macos-latest' && ('${{ matrix['node-version'] }}' === '12.x' || '${{ matrix['node-version'] }}' === '14.x')) { + return "x64" + } else { + return '' + } + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + architecture: ${{ steps.calculate_architecture.outputs.result }} + cache: "npm" + + - name: Install dependencies (old Node.js version) + run: | + rm package-lock.json + npm install --ignore-engines --ignore-scripts + npm install -D typescript@4 + if: matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x' || matrix.node-version == '18.x' + + - name: Install dependencies + run: npm ci + if: matrix.node-version == '20.x' || matrix.node-version == '22.x' || matrix.node-version == '24.x' + + - name: Install webpack ${{ matrix.webpack-version }} + if: matrix.webpack-version != 'latest' + run: npm i webpack@${{ matrix.webpack-version }} + + - name: Run tests for webpack version ${{ matrix.webpack-version }} + run: npm run test:coverage -- --ci + + - name: Submit coverage data to codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + + test-old-api: + name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack latest, old API + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: [12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 24.x] + + runs-on: ${{ matrix.os }} + + steps: + - name: Setup Git + if: matrix.os == 'windows-latest' + run: git config --global core.autocrlf input + + - uses: actions/checkout@v4 + - uses: actions/github-script@v7 + id: calculate_architecture + with: + result-encoding: string + script: | + if ('${{ matrix.os }}' === 'macos-latest' && ('${{ matrix['node-version'] }}' === '12.x' || '${{ matrix['node-version'] }}' === '14.x')) { + return "x64" + } else { + return '' + } + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + architecture: ${{ steps.calculate_architecture.outputs.result }} + cache: "npm" + + - name: Install dependencies (old Node.js version) + run: | + rm package-lock.json + npm install --ignore-engines --ignore-scripts + npm install -D typescript@4 + if: matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x' || matrix.node-version == '18.x' + + - name: Install dependencies + run: npm ci + if: matrix.node-version == '20.x' || matrix.node-version == '22.x' || matrix.node-version == '24.x' + + - name: Run tests for webpack version latest with experimentalUseImportModule + run: npm run test:coverage -- --ci + env: + OLD_API: "true" + + - name: Submit coverage data to codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index b70b127e..506b2a57 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ npm-debug.log* /coverage /dist /test/js +/test/outputs +/test/manual/dist /local /reports /node_modules @@ -14,3 +16,5 @@ Thumbs.db .vscode *.sublime-project *.sublime-workspace +.idea +*.iml diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 00000000..e8511eae --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..d37daa07 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install lint-staged diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..d9dd09e9 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +/coverage +/dist +/node_modules +/test/fixtures +/test/manual/dist +/test/cases/*/expected +/test/js +CHANGELOG.md diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e5b0c2d2..00000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -sudo: false -dist: trusty -language: node_js -branches: - only: - - master -jobs: - fast_finish: true - allow_failures: - - env: WEBPACK_VERSION=canary - include: - - &test-latest - stage: Webpack latest - node_js: 6 - env: WEBPACK_VERSION=latest JOB_PART=test - script: npm run travis:$JOB_PART - - <<: *test-latest - node_js: 8 - env: WEBPACK_VERSION=latest JOB_PART=lint - script: npm run travis:$JOB_PART - - <<: *test-latest - node_js: 8 - env: WEBPACK_VERSION=latest JOB_PART=coverage - script: npm run travis:$JOB_PART - after_success: 'bash <(curl -s https://codecov.io/bash)' - - stage: Webpack canary - before_script: yarn add git://github.com/webpack/webpack.git#master - script: npm run travis:$JOB_PART - node_js: 8 - env: WEBPACK_VERSION=canary JOB_PART=test -before_install: - - 'if [[ `npm -v` != 5* ]]; then npm i -g npm@^5.0.0; fi' - - nvm --version - - node --version - - npm --version -before_script: - - |- - if [ "$WEBPACK_VERSION" ]; then - yarn add webpack@$WEBPACK_VERSION - fi -script: - - 'npm run travis:$JOB_PART' -after_success: - - 'bash <(curl -s https://codecov.io/bash)' diff --git a/CHANGELOG.md b/CHANGELOG.md index 95fd7360..5faf2217 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,674 @@ +# Changelog + +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. + +### [2.9.4](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.9.3...v2.9.4) (2025-08-11) + + +### Bug Fixes + +* hmr crash in some situations ([#1140](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1140)) ([f67c05a](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/f67c05a2305dbfc0f949ce9f11c96c32cb402deb)) + +### [2.9.3](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.9.2...v2.9.3) (2025-08-04) + + +### Bug Fixes + +* should update initial chunks correctly with filename ([dab023f](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/dab023f4a7685bc20ef175e71dacd78d988e3713)) + +### [2.9.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.9.1...v2.9.2) (2024-11-01) + + +### Bug Fixes + +* prefetch and preload runtime generation ([#1116](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1116)) ([58c6b74](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/58c6b7422aedfd3fc4d5f3553b196da40eae1f4b)) + +### [2.9.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.9.0...v2.9.1) (2024-08-19) + + +### Bug Fixes + +* add `export default {}` when CSS modules enabled and a file is empty for the `defaultExport` option ([8f77e19](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/8f77e19a89eca97b05f1855d2c851592e98ff774)) + +## [2.9.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.8.1...v2.9.0) (2024-04-16) + + +### Features + +* add support for link preload/prefetch ([#1043](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1043)) ([ee25e51](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/ee25e51a8d06292dd8643f5bf1d6c4faa51c4f4c)) +* added the `defaultExport` option to generate default and named export together ([#1084](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1084)) ([74ae781](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/74ae78184fb5bfeec23b9d254ff8304c6fc854d6)) + + +### Bug Fixes + +* avoid reloading all csses when hot load ([#1090](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1090)) ([1a56673](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/1a56673d01c441967134beb5d9500a7d6d62e4de)) + +### [2.8.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.8.0...v2.8.1) (2024-02-27) + + +### Bug Fixes + +* add `nonce` if `__webpack_nonce__` has been defined ([c7f0aee](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/c7f0aee5feaa1b8d047f575e94a91662eb8c314c)) + +## [2.8.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.7...v2.8.0) (2024-02-01) + + +### Features + +* added the `beforeTagInsert` hook ([#1054](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1054)) ([6313bf6](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/6313bf629c1c76ec7b07dc60fef06e39702a63d9)) +* support named exports with any characters ([b656c5c](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/b656c5c98dcffcae51f5208e961ce089be6607a8)) + +### [2.7.7](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.6...v2.7.7) (2024-01-10) + + +### Bug Fixes + +* add ';' to import media queries ([#1051](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1051)) ([98acf2b](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/98acf2bbd08ba0988318c6d364b9aa14f84ed79a)) +* add `ChunkLoadError` name to chunk loading error ([#1073](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1073)) ([e3f8375](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/e3f837574bdad9dc583028c6f9a9a2f3082d9ecb)) +* adding media, supports and layer for external import ([#1072](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1072)) ([60c5331](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/60c53311c125425d2e742414ed6dbd59cea8cbe4)) +* css experiment detection ([#1067](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1067)) ([82f4a47](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/82f4a47f3ddc7cdbba311bee50d85dd4b3e6bfb1)) + +### [2.7.6](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.5...v2.7.6) (2023-05-19) + + +### Bug Fixes + +* compatibility with built-in CSS support ([#1035](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1035)) ([f576ed6](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/f576ed6a530db555d7442ebab1f9a09f3acff13f)) + +### [2.7.5](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.4...v2.7.5) (2023-03-16) + + +### Bug Fixes + +* don't invalidate cache after timeout refresh ([#1023](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1023)) ([38d8513](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/38d8513f97983698b3b4417abb8bacaee0ea68fb)) +* readable identifier ([#1024](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1024)) ([721bbf1](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/721bbf104030c96acff14ad2b7a23edc4f1e277d)) + +### [2.7.4](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.3...v2.7.4) (2023-03-16) + + +### Bug Fixes + +* module identifier, don't merge modules with different media/suppors/layer ([#1021](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1021)) ([ad3729b](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/ad3729ba9d3fed328a170340eafb66e8c2a13bdc)) + +### [2.7.3](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.2...v2.7.3) (2023-03-07) + + +### Bug Fixes + +* avoid to throw error when link doesn't have parentNode ([#1016](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1016)) ([6292440](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/62924409895ff6e0e4e599f6734c109ec40e6eff)) + +### [2.7.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.1...v2.7.2) (2022-12-06) + + +### Bug Fixes + +* don't crash in web workers ([#1004](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/1004)) ([4d98d4b](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/4d98d4b973be27910b84194e6f7acb1d09f1e8ae)) + +### [2.7.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.0...v2.7.1) (2022-11-29) + + +### Bug Fixes + +* preserve order of link tags on HMR ([#982](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/982)) ([6ea0922](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/6ea092258944fd0330b84dd3455bff9a15320837)) + +## [2.7.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.6.1...v2.7.0) (2022-11-16) + + +### Features + +* add function support for locals (loader) ([#985](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/985)) ([65519d0](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/65519d0701b3c5d60585468b8220159cbbfbe6b8)) + +### [2.6.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.6.0...v2.6.1) (2022-06-15) + + +### Bug Fixes + +* do not attempt hot reloading when emit is false ([#953](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/953)) ([b426f04](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/b426f04961846991e8ca671c6a4d48e6a83a46c2)) + +## [2.6.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.5.3...v2.6.0) (2022-03-03) + + +### Features + +* added `baseUri` option support (from entry options) ([#915](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/915)) ([6004d95](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/6004d95cad2d18d9d080d913db7dc48f16bf888c)) + +### [2.5.3](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.5.2...v2.5.3) (2022-01-25) + + +### Bug Fixes + +* types ([#903](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/903)) ([6650691](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/6650691f7e6a45004779566c909a0e48e9d67f04)) + +### [2.5.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.5.1...v2.5.2) (2022-01-17) + + +### Bug Fixes + +* types ([dfb9afd](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/dfb9afdfb2ea6c816d6d4986fbb382dac300e7ea)) + +### [2.5.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.5.0...v2.5.1) (2022-01-17) + + +### Bug Fixes + +* cjs export and types ([e836a00](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/e836a00cb164fecdb49e670e0552475477fa7994)) + +## [2.5.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.4.7...v2.5.0) (2022-01-14) + + +### Features + +* added types ([5b5654c](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/5b5654c9847a615555660d79245b857536f72124)) + +### [2.4.7](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.4.6...v2.4.7) (2022-01-13) + + +### Bug Fixes + +* multiple serializer registrations ([#894](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/894)) ([c784204](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/c784204772538ab8984e1c25e4501a7602b41ad1)) + +### [2.4.6](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.4.5...v2.4.6) (2022-01-06) + + +### Bug Fixes + +* crash when `publicPath` is function ([#881](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/881)) ([41bd828](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/41bd828ba11baf2c1349b3a8103072e2d82fd4c2)) +* do not allow absolute path in the `chunkFilename` option ([#879](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/879)) ([36e04ab](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/36e04ab8b5e55d429ce361841e77f6ddba934ee1)) +* do not allow absolute path in the `filename` option ([#878](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/878)) ([76361df](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/76361df4220f62c18b3660af76ab8b28c56d0471)) + +### [2.4.5](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.4.4...v2.4.5) (2021-11-17) + +### Chore + +* update `schema-utils` package to `4.0.0` version + +### [2.4.4](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.4.3...v2.4.4) (2021-11-04) + + +### Bug Fixes + +* crash with `[contenthash]` ([#869](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/869)) ([57ad127](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/57ad1274328512aebb20fa3b2c27fb9321f835a7)) +* runtime path in modules without context ([#866](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/866)) ([e2e30b2](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/e2e30b280d51f313e3ac566af3b839e580b22ef5)) + +### [2.4.3](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.4.2...v2.4.3) (2021-10-21) + + +### Bug Fixes + +* small perf improvement ([#860](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/860)) ([8c4846b](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/8c4846b3a55770cb7286b1f092e619204503ed7f)) + +### [2.4.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.4.1...v2.4.2) (2021-10-07) + + +### Bug Fixes + +* endless apply of loaders, leading to memory allocation failure ([#849](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/849)) ([94ad699](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/94ad699baa1805a0646e7db1d69eb5997df6c8db)) + +### [2.4.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.4.0...v2.4.1) (2021-10-05) + + +### Bug Fixes + +* crash with multiple webpack versions ([#845](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/845)) ([b4431cb](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/b4431cb60a6eadcf8c2b614f494faf899c73aaa0)) + +## [2.4.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.3.0...v2.4.0) (2021-10-05) + +### Performance + +* migrate on new API, this improves performance and memory usage a lot, you need to have at least webpack `5.52.0` (recommended latest stable), for older versions the old API will be used (except explicit enabling of the `experimentalUseImportModule` option) + + +### Features + +* added support for `supports()` and `layer()` in `@import` at-rule ([#843](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/843)) ([e751080](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/e751080ad6a81f196d5c26fb79b3c69b9429a634)) + + +### Bug Fixes + +* crash with the `exportLocalsConvention` option ([#844](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/844)) ([0f8d501](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/0f8d5015c95724b537ddc627758f67020d01ae0b)) + +## [2.3.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.2.2...v2.3.0) (2021-09-11) + + +### Features + +* added the `runtime` option ([#831](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/831)) ([5cc73e6](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/5cc73e6b590632263fc6ea0a830df1322520c2f4)) + + +### Bug Fixes + +* better description for async chunk options ([34b65ac](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/34b65ac4daea5a977a75846b159becbc2ebb0632)) + +### [2.2.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.2.1...v2.2.2) (2021-09-01) + + +### Bug Fixes + +* `experimentalUseImportModule` works with `new URL(...)` syntax ([cf81c4b](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/cf81c4b9962e74d666f6bb7d6473a9b6c06936cd)) + +### [2.2.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.2.0...v2.2.1) (2021-08-31) + + +### Bug Fixes + +* order of `@import` with the `output.pathinfo` option ([#815](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/815)) ([831f771](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/831f771b3c5e59978dbc53f1ccc90e23a9e30e9b)) +* source map generation with the `output.pathinfo` option ([#817](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/817)) ([f813b4c](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/f813b4c7b72383b8777da74b90830be20db6a483)) + +## [2.2.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.0.0...v2.2.0) (2021-08-04) + + +### Features + +* add `link` and `description` for options ([#786](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/786)) ([3c5a5b7](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/3c5a5b7aba8ed855368a7e95d89420b97dcd1531)) + + +### Bug Fixes + +* hmr in browser extension ([3d09da1](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/3d09da1abb9250b39c6a15efd33950aa19efb0b3)) + +## [2.1.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.0.0...v2.1.0) (2021-07-05) + + +### Features + +* support the `pathinfo` option ([#783](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/783)) ([a37713f](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/a37713f53bcecb9efc3f8a4d389c6274dae0bc85)) + +## [2.0.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.6.2...v2.0.0) (2021-06-30) + +### NOTES + +In the current release we have fixed many problems with `publicPath`, previously to generate relative URLs inside CSS files developers use different hacks: `publicPath: ''`, `publicPath: '../'`, using relative `../../` in the `outputPath` option for `file-loader` and etc. Now you don't need it anymore. Webpack v5 uses `publicPath: "auto"` by default, which means to always generate relative URLs, and now `mini-css-extract-plugin` does the same. + +**We strongly recommend use `auto` value by default (except when using CDN).** + +**We also want to show you that the [`file-loader`](https://github.com/webpack-contrib/file-loader) and [`url-loader`](https://github.com/webpack-contrib/url-loader) are outdated, please migrate on [Asset Modules](https://webpack.js.org/guides/asset-modules/).** + +### ⚠ BREAKING CHANGES + +* minimum supported `Node.js` version is `12.13.0` +* minimum supported `webpack` version is `5.0.0` +* the `modules.namedExport` option was removed, you don't need it anymore, because we respect the `modules.namedExport` option from `css-loader`, just remove it +* the `publicPath` option no longer automatically adds `/` (trailing slash), you need to specify, you need to specify it yourself if it is absent, i.e. if you have `publicPath: "/my/public/path"` replace it with `publicPath: "/my/public/path/"` + +### Bug Fixes + +* generating correct relative `url()` for assets inside CSS files when you use `publicPath: "auto"` (default value) + + +### [1.6.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.6.1...v1.6.2) (2021-06-28) + +### Bug Fixes + +* performance improvement + +### [1.6.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.6.0...v1.6.1) (2021-06-25) + + +### Bug Fixes + +* memory leaks ([c68aca7](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/c68aca7c58b1bfb3d3f9f8db70fd814e50f82aa1)) + +## [1.6.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.5.1...v1.6.0) (2021-04-30) + + +### Features + +* added new url support ([#753](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/753)) ([c76a1a1](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/c76a1a16b926e3dc8f6763d940ab6e4eb170c77f)) + +### [1.5.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.5.0...v1.5.1) (2021-04-28) + + +### Bug Fixes + +* compatibility with named export and es5 ([#751](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/751)) ([3be81bb](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/3be81bb4e795fc9295c2c7e7a8bb71de9cead2d0)) + +## [1.5.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.4.1...v1.5.0) (2021-04-17) + + +### Features + +* add experimental support for `importModule`, improve perfomance ([#737](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/737)) ([8471ac2](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/8471ac24dde3d7e874995f8ab4814cc94b4179e1)) + +### [1.4.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.4.0...v1.4.1) (2021-04-07) + + +### Bug Fixes + +* ES5 compatibility ([43e081f](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/43e081f3a2767f3c00a29349a71ad17eca9cc168)) + +## [1.4.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.9...v1.4.0) (2021-03-26) + + +### Features + +* added the `emit` option for SSR ([#732](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/732)) ([03b4293](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/03b4293023e85e89abf46a2e42d61ec8684cb318)) + +### [1.3.9](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.8...v1.3.9) (2021-02-25) + + +### Bug Fixes + +* allow consumers to access `CssModule` and `CssDependency` ([#703](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/703)) ([6484345](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/64843452a7c07963637a749bce9628d808694eac)) +* allow to use `auto` value with the `publicPath` option ([#709](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/709)) ([1be21d2](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/1be21d29053c32cfec26eb58aa5deabd65069c71)) + +### [1.3.8](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.7...v1.3.8) (2021-02-18) + + +### Bug Fixes + +* deterministic `[contenthash]` ([#702](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/702)) ([2ff8e59](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/2ff8e592e13d54dc87fad4fcf5065136d4610dca)) + +### [1.3.7](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.6...v1.3.7) (2021-02-15) + + +### Bug Fixes + +* compatibility with webpack v5 ([9b6b8b3](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/9b6b8b3a8393a62b7b7a3b38c0c52b694ed51e19)) + +### [1.3.6](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.5...v1.3.6) (2021-02-08) + + +### Bug Fixes + +* do not crash on using `[fullhash]` ([#695](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/695)) ([dbb708c](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/dbb708cf181d8f3d69af11cc15f959f187e38ffa)) + +### [1.3.5](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.4...v1.3.5) (2021-01-28) + + +### Bug Fixes + +* bloated runtime ([#687](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/687)) ([70ce174](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/70ce174941016174bb82ff46c808593a1e1b7e1e)) +* hmr runtime on preloaded stylesheet link ([#686](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/686)) ([05e2951](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/05e29514952bf3ff3f30ec33c4bda66999d8486b)) +* yarn pnp compatibility ([#688](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/688)) ([05b188a](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/05b188a055ee6663f8d307e99b22c51200fee320)) + +### [1.3.4](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.3...v1.3.4) (2021-01-13) + + +### Bug Fixes + +* `identifier` for `CssModule` ([#677](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/677)) ([117a97a](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/117a97acaa5b37c5183b5b48264d7e524e8f5bc3)) + +### [1.3.3](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.2...v1.3.3) (2020-12-10) + + +### Bug Fixes + +* serializing big strings in sourceMap ([#665](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/665)) ([f7a5e53](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/f7a5e5381ce1d2b822d49b688027d06efec2312d)) + +### [1.3.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.1...v1.3.2) (2020-12-04) + + +### Bug Fixes + +* missing auxiliary assets ([#662](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/662)) ([f28c1e1](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/f28c1e115fb9aacbd87e3b1540adb7418a4cc375)) + +### [1.3.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.0...v1.3.1) (2020-11-12) + + +### Bug Fixes + +* compatibility with asset modules ([#656](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/656)) ([bea1f4d](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/bea1f4d0c25abc6268b8076305e9879344ff1701)) + +## [1.3.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.2.1...v1.3.0) (2020-11-06) + + +### ⚠ POTENTIAL BREAKING CHANGE + +Options are now validated according to stricter rules - no unknown additional properties. For example, if you have not removed the `hmr` option for the loader when migrating to `mini-css-extract-plugin@1`, you will get an error. Just remove them from your configuration(s). We did this because many developers started making these mistakes. + +### Features + +* added the `type` property for loading errors ([#651](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/651)) ([be9ddcb](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/be9ddcba7f4b216aa52dcd64a0e450a312b7156f)) + + +### Bug Fixes + +* schema ([#652](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/652)) ([4e4733d](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/4e4733dc10fd8a8ecda5b47421b390a479b826aa)) +* serializing big strings ([#647](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/647)) ([022d945](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/022d9459a6f158166e700c11a02b9063154c96bc)) +* source map url for devtool (only webpack@5) ([#650](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/650)) ([5889d43](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/5889d43bafe8613a29e3a8156f0b5052b6ad88b9)) + +### [1.2.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.2.0...v1.2.1) (2020-10-27) + + +### Bug Fixes + +* onerror/onload memory leak ([#640](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/640)) ([2b6fcf2](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/2b6fcf260b2fb13afe2abd052cff5dea184ef398)) + +## [1.2.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.1.2...v1.2.0) (2020-10-23) + + +### Features + +* added the `linkType` option ([#634](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/634)) ([a89c0f9](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/a89c0f982716d1093dbe6b12de47e4e8df1543f5)) + + +### Bug Fixes + +* compatibility with webpack@4 and webpack@5 for monorepos ([#638](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/638)) ([60c3eef](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/60c3eef936245183451d63f1e080ce990553078d)) + +### [1.1.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.1.0...v1.1.2) (2020-10-22) + + +### Bug Fixes + +* compatibility with webpack@4 and webpack@5 for monorepos ([#636](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/636)) ([3413439](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/341343924d96f5d0076f27b98c96f9439bff6347)) +* error when reloading async chunk ([#633](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/633)) ([89e7a0a](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/89e7a0acf08f36711c916a4827ea6afff7028afb)) + +### [1.1.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.1.0...v1.1.1) (2020-10-20) + + +### Bug Fixes + +* fix `onerror` message for async chunks ([#629](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/629)) ([883079e](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/883079e02b9d400fab4e8a955604036a3be50c48)) + +## [1.1.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.0.0...v1.1.0) (2020-10-19) + + +### Features + +* added the `attributes` option ([e8a2d5a](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/e8a2d5a09ded967e0f4be145f1f52c1e5f7f6df1)) +* added the `insert` option ([a5f17c4](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/a5f17c48cbf0c198ebc955032d11593434ef2373)) + + +### Bug Fixes + +* ignore modules without identifier ([#627](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/627)) ([71a9ce9](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/71a9ce91b377fff892068b87445372fe1c2db142)) +* remove `normalize-url` from deps ([#623](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/623)) ([9ae47e5](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/9ae47e51f198f2e0258d0e87d6e708e57c05bf86)) + +### [1.0.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.12.0...v1.0.0) (2020-10-09) + +### BREAKING CHANGE + +* minimum supported `Node.js` version is `10.13.0` +* the `esModule` option is `true` by default, you need to change `const locals = require('./styles.css')`/`require('./styles.css')` on `import locals from './styles.css'`/`import './styles.css''` +* the `moduleFilename` option was removed in favor the `filename` option +* the `hmr` option was removed, HMR will work automatically when `HotModuleReplacement` plugin used or `webpack-dev-server` with enabled the `hot` option +* the `reloadAll` was removed + +### Features + +- the `chunkFilename` option can be a function for webpack@5 + +### ⚠ NOTICE + +To avoid problems between `mini-css-extract-plugin` and `style-loader` because of changing the `esModule` option to `true` by default we strongly recommend upgrading `style-loader` to `2.0.0` version. + +### [0.12.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.11.3...v0.12.0) (2020-10-07) + + +### Features + +* opt-in to transitive only side effects (webpack@5), no more empty JS chunks + +### [0.11.3](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.11.2...v0.11.3) (2020-10-02) + + +### Bug Fixes + +* better support for webpack 5 ([#595](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/595)) ([6e09a51](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/6e09a51954aee1c8db904747e0b9bc42d14e7b47)) + +### [0.11.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.11.1...v0.11.2) (2020-09-12) + + +### Bug Fixes + +* cache for webpack@5 ([6a27b30](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/6a27b30fea43d2d179d7df5deb260887d6b45ccc)) + +### [0.11.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.11.0...v0.11.1) (2020-09-08) + + +### Bug Fixes + +* added cache serializer for webpack@5 ([#581](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/581)) ([d09693e](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/d09693e7d50858c319a804736cf9609479140ad8)) + +### [0.11.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.10.0...v0.11.0) (2020-08-27) + + +### Features + +* named export ([1ea4b7f](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/1ea4b7fe8305fcca7915d5c1dccd6041bab2c053)) + + +### Bug Fixes + +* compatibility with webpack@5 + +### [0.10.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.9.0...v0.10.0) (2020-08-10) + + +### Features + +* schema validation ([#480](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/480)) ([b197757](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/b197757e26af717a302485293a2b95bc0eb6cf71)) + +### Bug Fixes + +* add semicolon to avoid `Uncaught TypeError` on Webpack v5 ([#561](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/561)) ([3974210](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/3974210ec820f47cf717cd0829d4e4e3879a518a)) +* enforce esm ([#546](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/546)) ([b146549](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/b1465491b1706e0f450cf69df4cf8176799907d1)) +* partial compatibility with `webpack@5` ([#477](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/477)) ([903a56e](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/903a56ea3fa08e173cd548d23089d0cee25bafea)) + +### [0.9.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.8.2...v0.9.0) (2019-12-20) + + +### Features + +* new `esModule` option ([#475](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/475)) ([596e47a](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/596e47a8aead53f9cc0e2b1e09a2c20e455e45c1)) + +### [0.8.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.8.1...v0.8.2) (2019-12-17) + + +### Bug Fixes + +* context for dependencies ([#474](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/474)) ([0269860](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/0269860adb0eaad477901188eea66693fedf7769)) + +### [0.8.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.8.0...v0.8.1) (2019-12-17) + + +### Bug Fixes + +* use filename mutated after instantiation ([#430](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/430)) ([0bacfac](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/0bacfac7ef4a06b4810fbc140875f7a038caa5bc)) +* improve warning of conflict order ([#465](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/465)) ([357d073](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/357d073bf0259f2c44e613ad4dfcbcc8354e4be3)) +* support ES module syntax ([#472](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/472)) ([2f72e1a](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/2f72e1aa267de23f121441714e88406f579e77b2)) + +## [0.8.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.7.0...v0.8.0) (2019-07-16) + + +### Features + +* Add ignoreOrder option ([#422](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/422)) ([4ad3373](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/4ad3373)) + + + +## [0.7.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.6.0...v0.7.0) (2019-05-27) + + +### Bug Fixes + +* do not attempt to reload unrequestable urls ([#378](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/378)) ([44d00ea](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/44d00ea)) +* fix `publicPath` regression ([#384](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/384)) ([582ebfe](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/582ebfe)) +* enable using plugin without defining options ([#393](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/393)) ([a7dee8c](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/a7dee8c)) +* downgrading normalize-url ([#399](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/399)) ([0dafaf6](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/0dafaf6)) +* hmr do not crash on link without href ([#400](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/400)) ([aa9b541](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/aa9b541)) +* hmr reload with invalid link url ([#402](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/402)) ([30a19b0](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/30a19b0)) + + +### Features + +* add `moduleFilename` option ([#381](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/381)) ([13e9cbf](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/13e9cbf)) + + + + +# [0.6.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.5.0...v0.6.0) (2019-04-10) + + +### Features + +* added error code to chunk load Error ([#347](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/347)) ([b653641](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/b653641)) +* adding hot module reloading ([#334](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/334)) ([4ed9c5a](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/4ed9c5a)) +* publicPath can be a function ([#373](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/373)) ([7b1425a](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/7b1425a)) + + + + +# [0.5.0](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.4.5...v0.5.0) (2018-12-07) + + +### Features + +* add crossOriginLoading option support ([#313](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/313)) ([ffb0d87](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/ffb0d87)) + + + + +## [0.4.5](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.4.4...v0.4.5) (2018-11-21) + + +### Bug Fixes + +* **index:** allow requesting failed async css files ([#292](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/292)) ([2eb0af5](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/2eb0af5)) + + + + +## [0.4.4](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.4.3...v0.4.4) (2018-10-10) + + +### Bug Fixes + +* **index:** assign empty `module.id` to prevent `contenthash` from changing unnecessarily ([#284](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/284)) ([d7946d0](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/d7946d0)) + + + + +## [0.4.3](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.4.2...v0.4.3) (2018-09-18) + + +### Bug Fixes + +* **loader:** pass `emitFile` to the child compilation (`loaderContext.emitFile`) ([#177](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/177)) ([18c066e](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/18c066e)) + + + + +## [0.4.2](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.4.0...v0.4.2) (2018-08-21) + + +### Bug Fixes + +* use correct order when multiple chunk groups are merged ([#246](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/246)) ([c3b363d](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/c3b363d)) + + + + +## [0.4.1](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.4.0...v0.4.1) (2018-06-29) + + +### Bug Fixes + +* CSS ordering with multiple entry points ([#130](https://github.com/webpack-contrib/mini-css-extract-plugin/issues/130)) ([79373eb](https://github.com/webpack-contrib/mini-css-extract-plugin/commit/79373eb)) + + + # Change Log 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. diff --git a/README.md b/README.md index 91a22298..5780fe7e 100644 --- a/README.md +++ b/README.md @@ -1,154 +1,1296 @@ +
+ + + + +

mini-css-extract-plugin

+
+ [![npm][npm]][npm-url] -[![deps][deps]][deps-url] -[![test][test]][test-url] +[![node][node]][node-url] +[![tests][tests]][tests-url] [![coverage][cover]][cover-url] -[![chat][chat]][chat-url] +[![discussion][discussion]][discussion-url] +[![size][size]][size-url] + +# mini-css-extract-plugin + +This plugin extracts CSS into separate files. It creates a CSS file for each JS file that contains CSS. It supports On-Demand-Loading of CSS and SourceMaps. + +It builds on top of a new webpack v5 feature and requires webpack 5 to work. + +Compared to the extract-text-webpack-plugin: + +- Async loading +- No duplicate compilation (performance) +- Easier to use +- Specific to CSS + +## Getting Started + +To begin, you'll need to install `mini-css-extract-plugin`: + +```console +npm install --save-dev mini-css-extract-plugin +``` + +or + +```console +yarn add -D mini-css-extract-plugin +``` + +or + +```console +pnpm add -D mini-css-extract-plugin +``` + +It's recommended to combine `mini-css-extract-plugin` with the [`css-loader`](https://github.com/webpack/css-loader) + +Then add the loader and the plugin to your `webpack` configuration. For example: + +**style.css** + +```css +body { + background: green; +} +``` + +**component.js** + +```js +import "./style.css"; +``` + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [new MiniCssExtractPlugin()], + module: { + rules: [ + { + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, +}; +``` + +> [!WARNING] +> +> Note that if you import CSS from your webpack entrypoint or import styles in the [initial](https://webpack.js.org/concepts/under-the-hood/#chunks) chunk, `mini-css-extract-plugin` will not load this CSS into the page automatically. Please use [`html-webpack-plugin`](https://github.com/jantimon/html-webpack-plugin) for automatic generation `link` tags or manually include a `` tag in your `index.html` file. + +> [!WARNING] +> +> Source maps works only for `source-map`/`nosources-source-map`/`hidden-nosources-source-map`/`hidden-source-map` values because CSS only supports source maps with the `sourceMappingURL` comment (i.e. `//# sourceMappingURL=style.css.map`). If you need set `devtool` to another value you can enable source maps generation for extracted CSS using [`sourceMap: true`](https://github.com/webpack/css-loader#sourcemap) for `css-loader`. + +## Options + +### Plugin Options + +- **[`filename`](#filename)** +- **[`chunkFilename`](#chunkFilename)** +- **[`ignoreOrder`](#ignoreOrder)** +- **[`insert`](#insert)** +- **[`attributes`](#attributes)** +- **[`linkType`](#linkType)** +- **[`runtime`](#runtime)** +- **[`experimentalUseImportModule`](#experimentalUseImportModule)** + +#### `filename` + +Type: + +```ts +type filename = + | string + | ((pathData: PathData, assetInfo?: AssetInfo) => string); +``` + +Default: `[name].css` + +This option determines the name of each output CSS file. + +Works like [`output.filename`](https://webpack.js.org/configuration/output/#outputfilename) + +#### `chunkFilename` + +Type: + +```ts +type chunkFilename = + | string + | ((pathData: PathData, assetInfo?: AssetInfo) => string); +``` + +Default: `Based on filename` + +> Specifying `chunkFilename` as a `function` is only available in webpack@5 + +This option determines the name of non-entry chunk files. + +Works like [`output.chunkFilename`](https://webpack.js.org/configuration/output/#outputchunkfilename) + +#### `ignoreOrder` + +Type: + +```ts +type ignoreOrder = boolean; +``` + +Default: `false` + +Remove Order Warnings. +See [examples](#remove-order-warnings) for more details. + +#### `insert` + +Type: + +```ts +type insert = string | ((linkTag: HTMLLinkElement) => void); +``` + +Default: `document.head.appendChild(linkTag);` + +Inserts the `link` tag at the given position for [non-initial (async)](https://webpack.js.org/concepts/under-the-hood/#chunks) CSS chunks + +> [!WARNING] +> +> Only applicable for [non-initial (async)](https://webpack.js.org/concepts/under-the-hood/#chunks) chunks. + +By default, the `mini-css-extract-plugin` appends styles (`` elements) to `document.head` of the current `window`. + +However in some circumstances it might be necessary to have finer control over the append target or even delay `link` elements insertion. +For example this is the case when you asynchronously load styles for an application that runs inside of an iframe. +In such cases `insert` can be configured to be a function or a custom selector. + +If you target an [iframe](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement), make sure that the parent document has sufficient access rights to reach into the frame document and append elements to it. + +##### `string` + +Allows to setup custom [query selector](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector). +A new `` element will be inserted after the found item. + +**webpack.config.js** + +```js +new MiniCssExtractPlugin({ + insert: "#some-element", +}); +``` + +A new `` tag will be inserted after the element with the ID `some-element`. + +##### `function` + +Allows to override default behavior and insert styles at any position. + +> ⚠ Do not forget that this code will run in the browser alongside your application. Since not all browsers support latest ECMA features like `let`, `const`, `arrow function expression` and etc we recommend you to use only ECMA 5 features and syntax. +> +> > ⚠ The `insert` function is serialized to string and passed to the plugin. This means that it won't have access to the scope of the webpack configuration module. + +**webpack.config.js** + +```js +new MiniCssExtractPlugin({ + insert(linkTag) { + const reference = document.querySelector("#some-element"); + if (reference) { + reference.parentNode.insertBefore(linkTag, reference); + } + }, +}); +``` + +A new `` tag will be inserted before the element with the ID `some-element`. + +#### `attributes` + +Type: + +```ts +type attributes = Record; +``` + +Default: `{}` + +> [!WARNING] +> +> Only applies to [non-initial (async)](https://webpack.js.org/concepts/under-the-hood/#chunks) chunks. + +If defined, the `mini-css-extract-plugin` will attach given attributes with their values on `` element. + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [ + new MiniCssExtractPlugin({ + attributes: { + id: "target", + "data-target": "example", + }, + }), + ], + module: { + rules: [ + { + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, +}; +``` + +> [!NOTE] +> +> It's only applied to dynamically loaded CSS chunks. +> If you want to modify `` attributes inside HTML file, please use [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) + +#### `linkType` + +Type: + +```ts +type linkType = string | boolean; +``` + +Default: `text/css` + +This option allows loading asynchronous chunks with a custom link type, such as ``. + +##### `string` + +Possible values: `text/css` + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [ + new MiniCssExtractPlugin({ + linkType: "text/css", + }), + ], + module: { + rules: [ + { + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, +}; +``` + +##### `boolean` + +`false` disables the link `type` attribute entirely. + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [ + new MiniCssExtractPlugin({ + linkType: false, + }), + ], + module: { + rules: [ + { + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, +}; +``` + +#### `runtime` + +Type: + +```ts +type runtime = boolean; +``` + +Default: `true` + +Allows to enable/disable the runtime generation. +CSS will be still extracted and can be used for a custom loading methods. +For example, you can use [assets-webpack-plugin](https://github.com/ztoben/assets-webpack-plugin) to retrieve them then use your own runtime code to download assets when needed. + +`false` to skip. + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [ + new MiniCssExtractPlugin({ + runtime: false, + }), + ], + module: { + rules: [ + { + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, +}; +``` + +#### `experimentalUseImportModule` + +Type: + +```ts +type experimentalUseImportModule = boolean; +``` + +Default: `undefined` + +Enabled by default if not explicitly enabled (i.e. `true` and `false` allow you to explicitly control this option) and new API is available (at least webpack `5.52.0` is required). +Boolean values are available since version `5.33.2`, but you need to enable `experiments.executeModule` (not required from webpack `5.52.0`). + +Use a new webpack API to execute modules instead of child compilers, significantly improving performance and memory usage. + +When combined with `experiments.layers`, this adds a `layer` option to the loader options to specify the layer of the CSS execution. + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [ + new MiniCssExtractPlugin({ + // You don't need this for `>= 5.52.0` due to the fact that this is enabled by default + // Required only for `>= 5.33.2 & <= 5.52.0` + // Not available/unsafe for `<= 5.33.2` + experimentalUseImportModule: true, + }), + ], + module: { + rules: [ + { + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, +}; +``` + +### Loader Options + +- **[`publicPath`](#publicPath)** +- **[`emit`](#emit)** +- **[`esModule`](#esModule)** +- **[`defaultExport`](#defaultExport)** + +#### `publicPath` + +Type: + +```ts +type publicPath = + | string + | ((resourcePath: string, rootContext: string) => string); +``` + +Default: the `publicPath` in `webpackOptions.output` + +Specifies a custom public path for the external resources like images, files, etc inside `CSS`. +Works like [`output.publicPath`](https://webpack.js.org/configuration/output/#outputpublicpath) + +##### `string` + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [ + new MiniCssExtractPlugin({ + // Options similar to the same options in webpackOptions.output + // both options are optional + filename: "[name].css", + chunkFilename: "[id].css", + }), + ], + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + publicPath: "/public/path/to/", + }, + }, + "css-loader", + ], + }, + ], + }, +}; +``` + +##### `function` + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [ + new MiniCssExtractPlugin({ + // Options similar to the same options in webpackOptions.output + // both options are optional + filename: "[name].css", + chunkFilename: "[id].css", + }), + ], + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + publicPath: (resourcePath, context) => + `${path.relative(path.dirname(resourcePath), context)}/`, + }, + }, + "css-loader", + ], + }, + ], + }, +}; +``` + +#### `emit` + +Type: + +```ts +type emit = boolean; +``` + +Default: `true` + +If `true`, emits a file (writes a file to the filesystem). +If `false`, the plugin will extract the CSS but **will not** emit the file. +It is often useful to disable this option for server-side packages. + +#### `esModule` + +Type: + +```ts +type esModule = boolean; +``` + +Default: `true` + +By default, `mini-css-extract-plugin` generates JS modules that use the ES modules syntax. +There are some cases in which using ES modules is beneficial, like in the case of [module concatenation](https://webpack.js.org/plugins/module-concatenation-plugin/) and [tree shaking](https://webpack.js.org/guides/tree-shaking/). + +You can enable a CommonJS syntax using: + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [new MiniCssExtractPlugin()], + module: { + rules: [ + { + test: /\.css$/i, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + esModule: false, + }, + }, + "css-loader", + ], + }, + ], + }, +}; +``` + +#### `defaultExport` + +Type: + +```ts +type defaultExport = boolean; +``` + +Default: `false` + +> [!NOTE] +> +> This option will work only when you set `namedExport` to `true` in `css-loader` + +By default, `mini-css-extract-plugin` generates JS modules based on the `esModule` and `namedExport` options in `css-loader`. +Using the `esModule` and `namedExport` options will allow you to better optimize your code. +If you set `esModule: true` and `namedExport: true` for `css-loader` `mini-css-extract-plugin` will generate **only** a named export. +Our official recommendation is to use only named export for better future compatibility. +But for some applications, it is not easy to quickly rewrite the code from the default export to a named export. + +In case you need both default and named exports, you can enable this option: + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [new MiniCssExtractPlugin()], + module: { + rules: [ + { + test: /\.css$/i, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + defaultExport: true, + }, + }, + { + loader: "css-loader", + options: { + esModule: true, + modules: { + namedExport: true, + }, + }, + }, + ], + }, + ], + }, +}; +``` + +## Examples + +### Recommended + +For `production` builds, it is recommended to extract the CSS from your bundle being able to use parallel loading of CSS/JS resources later on. This can be achieved by using the `mini-css-extract-plugin`, because it creates separate css files. +For `development` mode (including `webpack-dev-server`) you can use [style-loader](https://github.com/webpack/style-loader), because it injects CSS into the DOM using multiple and works faster. + +> Important: Do not use `style-loader` and `mini-css-extract-plugin` together. + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +const devMode = process.env.NODE_ENV !== "production"; + +module.exports = { + module: { + rules: [ + { + // If you enable `experiments.css` or `experiments.futureDefaults`, please uncomment line below + // type: "javascript/auto", + test: /\.(sa|sc|c)ss$/, + use: [ + devMode ? "style-loader" : MiniCssExtractPlugin.loader, + "css-loader", + "postcss-loader", + "sass-loader", + ], + }, + ], + }, + plugins: [devMode ? [] : [new MiniCssExtractPlugin()]].flat(), +}; +``` -
- - - - - -

mini-css-extract-plugin

-

desc

-
+### Minimal example -This plugin extract CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS and SourceMaps. +**webpack.config.js** -It builds on top of a new webpack v4 feature (module types) and requires webpack 4 to work. +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); -Compared to the extract-text-webpack-plugin: +module.exports = { + plugins: [ + new MiniCssExtractPlugin({ + // Options similar to the same options in webpackOptions.output + // all options are optional + filename: "[name].css", + chunkFilename: "[id].css", + ignoreOrder: false, // Enable to remove warnings about conflicting order + }), + ], + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + // you can specify a publicPath here + // by default it uses publicPath in webpackOptions.output + publicPath: "../", + }, + }, + "css-loader", + ], + }, + ], + }, +}; +``` -* Async loading -* No duplicate compilation (performance) -* Easier to use -* Specific to CSS +### Named export for CSS Modules -TODO: +> ⚠ Names of locals are converted to `camelCase`. -* HMR support +> ⚠ It is not allowed to use JavaScript reserved words in CSS class names. -

Install

+> ⚠ Options `esModule` and `modules.namedExport` in `css-loader` should be enabled. -```bash -npm install --save-dev mini-css-extract-plugin +**styles.css** + +```css +.foo-baz { + color: red; +} +.bar { + color: blue; +} +``` + +**index.js** + +```js +import { bar, fooBaz } from "./styles.css"; + +console.log(fooBaz, bar); ``` -

Usage

+You can enable a ES module named export using: -### Configuration +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [new MiniCssExtractPlugin()], + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + }, + { + loader: "css-loader", + options: { + esModule: true, + modules: { + namedExport: true, + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, +}; +``` + +### The `publicPath` option as function + +You can specify `publicPath` as a function to dynamically determine the public path based on each resource’s location relative to the project root or context. **webpack.config.js** ```js const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + module.exports = { plugins: [ new MiniCssExtractPlugin({ // Options similar to the same options in webpackOptions.output // both options are optional filename: "[name].css", - chunkFilename: "[id].css" - }) + chunkFilename: "[id].css", + }), ], module: { rules: [ { test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + publicPath: (resourcePath, context) => + // publicPath is the relative path of the resource to the context + // e.g. for ./css/admin/main.css the publicPath will be ../../ + // while for ./css/main.css the publicPath will be ../ + `${path.relative(path.dirname(resourcePath), context)}/`, + }, + }, + "css-loader", + ], + }, + ], + }, +}; +``` + +### Advanced configuration example + +This plugin should not be used with `style-loader` in the loaders chain. + +Here is an example to have both HMR in `development` and your styles extracted in a file for `production` builds. + +(Loaders options left out for clarity, adapt accordingly to your needs.) + +You should not use `HotModuleReplacementPlugin` plugin if you are using a `webpack-dev-server`. +`webpack-dev-server` enables / disables HMR using `hot` option. + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const webpack = require("webpack"); + +const devMode = process.env.NODE_ENV !== "production"; + +const plugins = [ + new MiniCssExtractPlugin({ + // Options similar to the same options in webpackOptions.output + // both options are optional + filename: devMode ? "[name].css" : "[name].[contenthash].css", + chunkFilename: devMode ? "[id].css" : "[id].[contenthash].css", + }), +]; +if (devMode) { + // only enable hot in development + plugins.push(new webpack.HotModuleReplacementPlugin()); +} + +module.exports = { + plugins, + module: { + rules: [ + { + test: /\.(sa|sc|c)ss$/, use: [ MiniCssExtractPlugin.loader, - "css-loader" - ] - } - ] - } + "css-loader", + "postcss-loader", + "sass-loader", + ], + }, + ], + }, +}; +``` + +### Hot Module Reloading (HMR) + +> [!NOTE] +> +> HMR is automatically supported in webpack 5. No need to configure it. Skip the following: + +The `mini-css-extract-plugin` supports hot reloading of actual CSS files in development. +Some options are provided to enable HMR of both standard stylesheets and locally scoped CSS or CSS modules. +Below is an example configuration of mini-css for HMR use with CSS modules. + +You should not use `HotModuleReplacementPlugin` plugin if you are using a `webpack-dev-server`. +`webpack-dev-server` enables / disables HMR using `hot` option. + +**webpack.config.js** + +```js +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const webpack = require("webpack"); + +const plugins = [ + new MiniCssExtractPlugin({ + // Options similar to the same options in webpackOptions.output + // both options are optional + filename: devMode ? "[name].css" : "[name].[contenthash].css", + chunkFilename: devMode ? "[id].css" : "[id].[contenthash].css", + }), +]; +if (devMode) { + // only enable hot in development + plugins.push(new webpack.HotModuleReplacementPlugin()); } + +module.exports = { + plugins, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: {}, + }, + "css-loader", + ], + }, + ], + }, +}; +``` + +### Minimizing For Production + +To minify the output, use a plugin like [css-minimizer-webpack-plugin](https://github.com/webpack/css-minimizer-webpack-plugin). + +**webpack.config.js** + +```js +const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + chunkFilename: "[id].css", + }), + ], + module: { + rules: [ + { + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, + optimization: { + minimizer: [ + // For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`). + // Uncomment the next line o keep JS minimizers and add CSS minimizer: + // `...`, + new CssMinimizerPlugin(), + ], + }, +}; ``` -### Features +- By default, CSS minimization runs in production mode. +- If you want to run it also in development set the `optimization.minimize` option to `true`. + +### Using preloaded or inlined CSS -#### Using preloaded or inlined CSS +The runtime code detects already added CSS via `` or ` + + +

Body

+
+ + + +" +`; + +exports[`attributes option should work with attributes option: errors 1`] = `Array []`; + +exports[`attributes option should work with attributes option: warnings 1`] = `Array []`; + +exports[`attributes option should work without attributes option: DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`attributes option should work without attributes option: errors 1`] = `Array []`; + +exports[`attributes option should work without attributes option: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/emit-option.test.js.snap b/test/__snapshots__/emit-option.test.js.snap new file mode 100644 index 00000000..4ab1488d --- /dev/null +++ b/test/__snapshots__/emit-option.test.js.snap @@ -0,0 +1,169 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`emit option should invalidate the cache with disabled "emit" option: assets 1`] = ` +Array [ + "main.js", + "static/react.svg", +] +`; + +exports[`emit option should invalidate the cache with disabled "emit" option: assets 2`] = ` +Array [ + "main.js", +] +`; + +exports[`emit option should invalidate the cache with disabled "emit" option: emittedAssets 1`] = ` +Array [ + "main.js", + "static/react.svg", +] +`; + +exports[`emit option should invalidate the cache with disabled "emit" option: emittedAssets 2`] = `Array []`; + +exports[`emit option should invalidate the cache with disabled "emit" option: errors 1`] = `Array []`; + +exports[`emit option should invalidate the cache with disabled "emit" option: errors 2`] = `Array []`; + +exports[`emit option should invalidate the cache with disabled "emit" option: warnings 1`] = `Array []`; + +exports[`emit option should invalidate the cache with disabled "emit" option: warnings 2`] = `Array []`; + +exports[`emit option should work when emit option is "false": assets 1`] = ` +Array [ + "main.js", + "react.svg", +] +`; + +exports[`emit option should work when emit option is "false": errors 1`] = `Array []`; + +exports[`emit option should work when emit option is "false": warnings 1`] = `Array []`; + +exports[`emit option should work when emit option is "true": assets 1`] = ` +Array [ + "main.css", + "main.js", + "react.svg", +] +`; + +exports[`emit option should work when emit option is "true": errors 1`] = `Array []`; + +exports[`emit option should work when emit option is "true": warnings 1`] = `Array []`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": DOM 1`] = ` +" + style-loader test + + + +css.foo: uC86G4ZAUGUNgZ_8kGoW +css.bar: gaVCpLpTGYrkNPCq0Aat +css.baz: L2DsMGOk1eHgwznhgQ5Z +" +`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": DOM 2`] = ` +" + style-loader test + + + +css.foo-bar: zXlHvQRDVIOOddpg43og +css.bar: gaVCpLpTGYrkNPCq0Aat +css.baz: L2DsMGOk1eHgwznhgQ5Z +" +`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": assets 1`] = ` +Array [ + "main.js", +] +`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": assets 2`] = ` +Array [ + "main.js", +] +`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": emittedAssets 1`] = ` +Array [ + "main.js", +] +`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": emittedAssets 2`] = ` +Array [ + "main.js", +] +`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": errors 1`] = `Array []`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": errors 2`] = `Array []`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": warnings 1`] = `Array []`; + +exports[`emit option should work with locals and invalidate cache when emit option is "false": warnings 2`] = `Array []`; + +exports[`emit option should work with locals when emit option is "false": DOM 1`] = ` +" + style-loader test + + + +css.foo: uC86G4ZAUGUNgZ_8kGoW +css.bar: gaVCpLpTGYrkNPCq0Aat +css.baz: L2DsMGOk1eHgwznhgQ5Z +" +`; + +exports[`emit option should work with locals when emit option is "false": errors 1`] = `Array []`; + +exports[`emit option should work with locals when emit option is "false": warnings 1`] = `Array []`; + +exports[`emit option should work with the "memory" cache and disabled "emit" option: assets 1`] = ` +Array [ + "main.js", + "static/react.svg", +] +`; + +exports[`emit option should work with the "memory" cache and disabled "emit" option: assets 2`] = ` +Array [ + "main.js", + "static/react.svg", +] +`; + +exports[`emit option should work with the "memory" cache and disabled "emit" option: emittedAssets 1`] = ` +Array [ + "main.js", + "static/react.svg", +] +`; + +exports[`emit option should work with the "memory" cache and disabled "emit" option: emittedAssets 2`] = `Array []`; + +exports[`emit option should work with the "memory" cache and disabled "emit" option: errors 1`] = `Array []`; + +exports[`emit option should work with the "memory" cache and disabled "emit" option: errors 2`] = `Array []`; + +exports[`emit option should work with the "memory" cache and disabled "emit" option: warnings 1`] = `Array []`; + +exports[`emit option should work with the "memory" cache and disabled "emit" option: warnings 2`] = `Array []`; + +exports[`emit option should work without emit option: assets 1`] = ` +Array [ + "main.bundle.js", + "main.css", + "react.svg", +] +`; + +exports[`emit option should work without emit option: errors 1`] = `Array []`; + +exports[`emit option should work without emit option: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/insert-option.test.js.snap b/test/__snapshots__/insert-option.test.js.snap new file mode 100644 index 00000000..1e8530eb --- /dev/null +++ b/test/__snapshots__/insert-option.test.js.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`insert option should work when insert option is function: DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`insert option should work when insert option is function: errors 1`] = `Array []`; + +exports[`insert option should work when insert option is function: warnings 1`] = `Array []`; + +exports[`insert option should work when insert option is string: DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`insert option should work when insert option is string: errors 1`] = `Array []`; + +exports[`insert option should work when insert option is string: warnings 1`] = `Array []`; + +exports[`insert option should work without insert option: DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`insert option should work without insert option: errors 1`] = `Array []`; + +exports[`insert option should work without insert option: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/linkTag-option.test.js.snap b/test/__snapshots__/linkTag-option.test.js.snap new file mode 100644 index 00000000..8a4e62d9 --- /dev/null +++ b/test/__snapshots__/linkTag-option.test.js.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`linkType option should work when linkType option is "false": DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`linkType option should work when linkType option is "false": errors 1`] = `Array []`; + +exports[`linkType option should work when linkType option is "false": warnings 1`] = `Array []`; + +exports[`linkType option should work when linkType option is "text/css": DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`linkType option should work when linkType option is "text/css": errors 1`] = `Array []`; + +exports[`linkType option should work when linkType option is "text/css": warnings 1`] = `Array []`; + +exports[`linkType option should work without linkType option: DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`linkType option should work without linkType option: errors 1`] = `Array []`; + +exports[`linkType option should work without linkType option: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/nonce.test.js.snap b/test/__snapshots__/nonce.test.js.snap new file mode 100644 index 00000000..883f60b2 --- /dev/null +++ b/test/__snapshots__/nonce.test.js.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`nonce should work when __webpack_nonce__ is defined: DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`nonce should work when __webpack_nonce__ is defined: errors 1`] = `Array []`; + +exports[`nonce should work when __webpack_nonce__ is defined: warnings 1`] = `Array []`; + +exports[`nonce should work when __webpack_nonce__ is not defined: DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`nonce should work when __webpack_nonce__ is not defined: errors 1`] = `Array []`; + +exports[`nonce should work when __webpack_nonce__ is not defined: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/runtime-option.test.js.snap b/test/__snapshots__/runtime-option.test.js.snap new file mode 100644 index 00000000..56ffd112 --- /dev/null +++ b/test/__snapshots__/runtime-option.test.js.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`noRuntime option should work when the 'runtime' option is 'false': DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`noRuntime option should work when the 'runtime' option is 'false': errors 1`] = `Array []`; + +exports[`noRuntime option should work when the 'runtime' option is 'false': warnings 1`] = `Array []`; + +exports[`noRuntime option should work when the 'runtime' option is 'true': DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`noRuntime option should work when the 'runtime' option is 'true': errors 1`] = `Array []`; + +exports[`noRuntime option should work when the 'runtime' option is 'true': warnings 1`] = `Array []`; + +exports[`noRuntime option should work without the 'runtime' option: DOM 1`] = ` +" + style-loader test + + + +

Body

+
+ + + +" +`; + +exports[`noRuntime option should work without the 'runtime' option: errors 1`] = `Array []`; + +exports[`noRuntime option should work without the 'runtime' option: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/validate-loader-options.test.js.snap b/test/__snapshots__/validate-loader-options.test.js.snap new file mode 100644 index 00000000..3c05a023 --- /dev/null +++ b/test/__snapshots__/validate-loader-options.test.js.snap @@ -0,0 +1,74 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`validate options should throw an error on the "defaultExport" option with "1" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options.defaultExport should be a boolean. + -> Duplicate the named export with CSS modules locals to the default export (only when \`esModules: true\` for css-loader). + -> Read more at https://github.com/webpack/mini-css-extract-plugin#defaultexports" +`; + +exports[`validate options should throw an error on the "esModule" option with "1" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options.esModule should be a boolean. + -> Generates JS modules that use the ES modules syntax. + -> Read more at https://github.com/webpack/mini-css-extract-plugin#esmodule" +`; + +exports[`validate options should throw an error on the "publicPath" option with "true" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options.publicPath should be one of these: + string | function + -> Specifies a custom public path for the external resources like images, files, etc inside CSS. + -> Read more at https://github.com/webpack/mini-css-extract-plugin#publicpath + Details: + * options.publicPath should be a string. + * options.publicPath should be an instance of function." +`; + +exports[`validate options should throw an error on the "unknown" option with "/test/" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { publicPath?, emit?, esModule?, layer?, defaultExport? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "[]" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { publicPath?, emit?, esModule?, layer?, defaultExport? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "{"foo":"bar"}" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { publicPath?, emit?, esModule?, layer?, defaultExport? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "{}" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { publicPath?, emit?, esModule?, layer?, defaultExport? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "1" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { publicPath?, emit?, esModule?, layer?, defaultExport? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "false" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { publicPath?, emit?, esModule?, layer?, defaultExport? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "test" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { publicPath?, emit?, esModule?, layer?, defaultExport? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "true" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { publicPath?, emit?, esModule?, layer?, defaultExport? }" +`; diff --git a/test/__snapshots__/validate-plugin-options.test.js.snap b/test/__snapshots__/validate-plugin-options.test.js.snap new file mode 100644 index 00000000..b21b0c3a --- /dev/null +++ b/test/__snapshots__/validate-plugin-options.test.js.snap @@ -0,0 +1,183 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`validate options should throw an error on the "attributes" option with "true" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.attributes should be an object: + object { … } + -> Adds custom attributes to the \`link\` tag for non-initial (async) (https://webpack.js.org/concepts/under-the-hood/#chunks) CSS chunks. + -> Read more at https://github.com/webpack/mini-css-extract-plugin#attributes" +`; + +exports[`validate options should throw an error on the "chunkFilename" option with "" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.chunkFilename should be a non-empty string." +`; + +exports[`validate options should throw an error on the "chunkFilename" option with "/styles/[id].css" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.chunkFilename: A relative path is expected. However, the provided value \\"/styles/[id].css\\" is an absolute path!" +`; + +exports[`validate options should throw an error on the "chunkFilename" option with "true" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.chunkFilename should be one of these: + non-empty string | function + -> This option determines the name of non-entry chunk files. + -> Read more at https://github.com/webpack/mini-css-extract-plugin#chunkfilename + Details: + * options.chunkFilename should be a non-empty string. + * options.chunkFilename should be an instance of function." +`; + +exports[`validate options should throw an error on the "filename" option with "" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.filename should be a non-empty string." +`; + +exports[`validate options should throw an error on the "filename" option with "/styles/[name].css" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.filename: A relative path is expected. However, the provided value \\"/styles/[name].css\\" is an absolute path!" +`; + +exports[`validate options should throw an error on the "filename" option with "true" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.filename should be one of these: + non-empty string | function + -> This option determines the name of each output CSS file. + -> Read more at https://github.com/webpack/mini-css-extract-plugin#filename + Details: + * options.filename should be a non-empty string. + * options.filename should be an instance of function." +`; + +exports[`validate options should throw an error on the "ignoreOrder" option with "1" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.ignoreOrder should be a boolean. + -> Remove Order Warnings. + -> Read more at https://github.com/webpack/mini-css-extract-plugin#ignoreorder" +`; + +exports[`validate options should throw an error on the "insert" option with "{}" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.insert should be one of these: + string | function + -> Inserts the \`link\` tag at the given position for non-initial (async) (https://webpack.js.org/concepts/under-the-hood/#chunks) CSS chunks. + -> Read more at https://github.com/webpack/mini-css-extract-plugin#insert + Details: + * options.insert should be a string. + * options.insert should be an instance of function." +`; + +exports[`validate options should throw an error on the "insert" option with "1" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.insert should be one of these: + string | function + -> Inserts the \`link\` tag at the given position for non-initial (async) (https://webpack.js.org/concepts/under-the-hood/#chunks) CSS chunks. + -> Read more at https://github.com/webpack/mini-css-extract-plugin#insert + Details: + * options.insert should be a string. + * options.insert should be an instance of function." +`; + +exports[`validate options should throw an error on the "insert" option with "true" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.insert should be one of these: + string | function + -> Inserts the \`link\` tag at the given position for non-initial (async) (https://webpack.js.org/concepts/under-the-hood/#chunks) CSS chunks. + -> Read more at https://github.com/webpack/mini-css-extract-plugin#insert + Details: + * options.insert should be a string. + * options.insert should be an instance of function." +`; + +exports[`validate options should throw an error on the "linkType" option with "[]" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.linkType should be one of these: + \\"text/css\\" | boolean + -> This option allows loading asynchronous chunks with a custom link type + -> Read more at https://github.com/webpack/mini-css-extract-plugin#linktype + Details: + * options.linkType should be \\"text/css\\". + * options.linkType should be a boolean." +`; + +exports[`validate options should throw an error on the "linkType" option with "{}" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.linkType should be one of these: + \\"text/css\\" | boolean + -> This option allows loading asynchronous chunks with a custom link type + -> Read more at https://github.com/webpack/mini-css-extract-plugin#linktype + Details: + * options.linkType should be \\"text/css\\". + * options.linkType should be a boolean." +`; + +exports[`validate options should throw an error on the "linkType" option with "1" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.linkType should be one of these: + \\"text/css\\" | boolean + -> This option allows loading asynchronous chunks with a custom link type + -> Read more at https://github.com/webpack/mini-css-extract-plugin#linktype + Details: + * options.linkType should be \\"text/css\\". + * options.linkType should be a boolean." +`; + +exports[`validate options should throw an error on the "linkType" option with "invalid/type" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options.linkType should be one of these: + \\"text/css\\" | boolean + -> This option allows loading asynchronous chunks with a custom link type + -> Read more at https://github.com/webpack/mini-css-extract-plugin#linktype + Details: + * options.linkType should be \\"text/css\\". + * options.linkType should be a boolean." +`; + +exports[`validate options should throw an error on the "unknown" option with "/test/" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { filename?, chunkFilename?, experimentalUseImportModule?, ignoreOrder?, insert?, attributes?, linkType?, runtime? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "[]" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { filename?, chunkFilename?, experimentalUseImportModule?, ignoreOrder?, insert?, attributes?, linkType?, runtime? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "{"foo":"bar"}" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { filename?, chunkFilename?, experimentalUseImportModule?, ignoreOrder?, insert?, attributes?, linkType?, runtime? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "{}" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { filename?, chunkFilename?, experimentalUseImportModule?, ignoreOrder?, insert?, attributes?, linkType?, runtime? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "1" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { filename?, chunkFilename?, experimentalUseImportModule?, ignoreOrder?, insert?, attributes?, linkType?, runtime? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "false" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { filename?, chunkFilename?, experimentalUseImportModule?, ignoreOrder?, insert?, attributes?, linkType?, runtime? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "test" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { filename?, chunkFilename?, experimentalUseImportModule?, ignoreOrder?, insert?, attributes?, linkType?, runtime? }" +`; + +exports[`validate options should throw an error on the "unknown" option with "true" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. + - options has an unknown property 'unknown'. These properties are valid: + object { filename?, chunkFilename?, experimentalUseImportModule?, ignoreOrder?, insert?, attributes?, linkType?, runtime? }" +`; diff --git a/test/api.test.js b/test/api.test.js new file mode 100644 index 00000000..e71fddaf --- /dev/null +++ b/test/api.test.js @@ -0,0 +1,17 @@ +import webpack from "webpack"; + +import MiniCssExtractPlugin from "../src"; + +describe("API", () => { + it("should return the same CssModule when same webpack instance provided", () => { + expect(MiniCssExtractPlugin.getCssModule(webpack)).toEqual( + MiniCssExtractPlugin.getCssModule(webpack), + ); + }); + + it("should return the same CssDependency when same webpack instance provided", () => { + expect(MiniCssExtractPlugin.getCssDependency(webpack)).toEqual( + MiniCssExtractPlugin.getCssDependency(webpack), + ); + }); +}); diff --git a/test/attributes-option.test.js b/test/attributes-option.test.js new file mode 100644 index 00000000..8085035a --- /dev/null +++ b/test/attributes-option.test.js @@ -0,0 +1,74 @@ +/* eslint-env browser */ +import path from "path"; + +import MiniCssExtractPlugin from "../src"; + +import { + compile, + getCompiler, + getErrors, + getWarnings, + runInJsDom, +} from "./helpers/index"; + +describe("attributes option", () => { + it("should work without attributes option", async () => { + const compiler = getCompiler( + "attributes.js", + {}, + { + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + // console.log(dom.serialize()) + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it("should work with attributes option", async () => { + const compiler = getCompiler( + "attributes.js", + {}, + { + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + attributes: { + id: "target", + "data-target": "example", + }, + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + // console.log(dom.serialize()) + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); +}); diff --git a/test/cases/asset-modules/expected/main.css b/test/cases/asset-modules/expected/main.css new file mode 100644 index 00000000..0f3fa1e5 --- /dev/null +++ b/test/cases/asset-modules/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/static/react.svg); +} + diff --git a/test/cases/asset-modules/index.js b/test/cases/asset-modules/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/asset-modules/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/asset-modules/react.svg b/test/cases/asset-modules/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/asset-modules/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/asset-modules/style.css b/test/cases/asset-modules/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/asset-modules/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/asset-modules/webpack.config.js b/test/cases/asset-modules/webpack.config.js new file mode 100644 index 00000000..aee2a3ec --- /dev/null +++ b/test/cases/asset-modules/webpack.config.js @@ -0,0 +1,30 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + "css-loader", + ], + }, + { + test: /\.svg$/, + type: "asset/resource", + generator: { + filename: "static/[name][ext][query]", + }, + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/at-charset/a.css b/test/cases/at-charset/a.css new file mode 100644 index 00000000..f503561d --- /dev/null +++ b/test/cases/at-charset/a.css @@ -0,0 +1,11 @@ +@charset "utf-8"; + +@import "https://github.com/ae.css"; +@import "https://github.com/aa.css"; +@import "https://github.com/ab.css"; +@import "https://github.com/ac.css"; +@import "https://github.com/ad.css"; + +body { + background: red; +} diff --git a/test/cases/at-charset/aa.css b/test/cases/at-charset/aa.css new file mode 100644 index 00000000..253ded4b --- /dev/null +++ b/test/cases/at-charset/aa.css @@ -0,0 +1,5 @@ +@charset "utf-8"; + +.aa { + background: green; +} diff --git a/test/cases/at-charset/ab.css b/test/cases/at-charset/ab.css new file mode 100644 index 00000000..56d4d16d --- /dev/null +++ b/test/cases/at-charset/ab.css @@ -0,0 +1,5 @@ +@charset "utf-8"; + +.ab { + background: green; +} diff --git a/test/cases/at-charset/ac.css b/test/cases/at-charset/ac.css new file mode 100644 index 00000000..1cf799c7 --- /dev/null +++ b/test/cases/at-charset/ac.css @@ -0,0 +1,5 @@ +@charset "utf-8"; + +.ac { + background: green; +} diff --git a/test/cases/at-charset/ad.css b/test/cases/at-charset/ad.css new file mode 100644 index 00000000..a3af6572 --- /dev/null +++ b/test/cases/at-charset/ad.css @@ -0,0 +1,5 @@ +@charset "utf-8"; + +.ad { + background: green; +} diff --git a/test/cases/at-charset/ae.css b/test/cases/at-charset/ae.css new file mode 100644 index 00000000..f001afd5 --- /dev/null +++ b/test/cases/at-charset/ae.css @@ -0,0 +1,5 @@ +@charset "utf-8"; + +.ae { + background: green; +} diff --git a/test/cases/at-charset/b.css b/test/cases/at-charset/b.css new file mode 100644 index 00000000..10190b64 --- /dev/null +++ b/test/cases/at-charset/b.css @@ -0,0 +1,8 @@ +@charset "utf-8"; + +@import "https://github.com/ba.css"; +@import "https://github.com/bb.css"; + +body { + background: yellow; +} diff --git a/test/cases/at-charset/ba.css b/test/cases/at-charset/ba.css new file mode 100644 index 00000000..b7d79c83 --- /dev/null +++ b/test/cases/at-charset/ba.css @@ -0,0 +1,5 @@ +@charset "utf-8"; + +.ba { + background: green; +} diff --git a/test/cases/at-charset/bb.css b/test/cases/at-charset/bb.css new file mode 100644 index 00000000..0fcba139 --- /dev/null +++ b/test/cases/at-charset/bb.css @@ -0,0 +1,5 @@ +@charset "utf-8"; + +.bb { + background: green; +} diff --git a/test/cases/at-charset/expected/main.css b/test/cases/at-charset/expected/main.css new file mode 100644 index 00000000..98abe50a --- /dev/null +++ b/test/cases/at-charset/expected/main.css @@ -0,0 +1,54 @@ +@charset "utf-8"; + +.ae { + background: green; +} + +@charset "utf-8"; + +.aa { + background: green; +} + +@charset "utf-8"; + +.ab { + background: green; +} + +@charset "utf-8"; + +.ac { + background: green; +} + +@charset "utf-8"; + +.ad { + background: green; +} + +@charset "utf-8"; + +body { + background: red; +} + +@charset "utf-8"; + +.ba { + background: green; +} + +@charset "utf-8"; + +.bb { + background: green; +} + +@charset "utf-8"; + +body { + background: yellow; +} + diff --git a/test/cases/at-charset/index.js b/test/cases/at-charset/index.js new file mode 100644 index 00000000..5337afb9 --- /dev/null +++ b/test/cases/at-charset/index.js @@ -0,0 +1,2 @@ +import "./a.css"; +import "./b.css"; diff --git a/test/cases/at-charset/webpack.config.js b/test/cases/at-charset/webpack.config.js new file mode 100644 index 00000000..cf55c08c --- /dev/null +++ b/test/cases/at-charset/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/at-import-external-with-media/a.css b/test/cases/at-import-external-with-media/a.css new file mode 100644 index 00000000..1652c1f6 --- /dev/null +++ b/test/cases/at-import-external-with-media/a.css @@ -0,0 +1,15 @@ +@import url(http://some/path/to/css1.css); +@import url(http://some/path/to/css2.css) screen and (max-width: 1024px); +@import url(http://some/path/to/css3.css) supports(display: grid) screen and + (max-width: 400px); +@import url(http://some/path/to/css4.css) supports(display: grid); +@import url(http://some/path/to/css5.css) layer(); +@import url(http://some/path/to/css6.css) layer; +@import url(http://some/path/to/css7.css) layer(layer-name) + supports(display: grid) screen and (max-width: 1024px); +@import url(http://some/path/to/css8.css) layer(layer-name) screen and + (max-width: 1024px); + +body { + background: red; +} diff --git a/test/cases/at-import-external-with-media/b.css b/test/cases/at-import-external-with-media/b.css new file mode 100644 index 00000000..d1ff1aee --- /dev/null +++ b/test/cases/at-import-external-with-media/b.css @@ -0,0 +1,5 @@ +@import url("https://some/external/css"); + +.b { + background: red; +} diff --git a/test/cases/at-import-external-with-media/expected/main.css b/test/cases/at-import-external-with-media/expected/main.css new file mode 100644 index 00000000..6207fe2a --- /dev/null +++ b/test/cases/at-import-external-with-media/expected/main.css @@ -0,0 +1,19 @@ +@import url(http://some/path/to/css1.css); +@import url(http://some/path/to/css2.css) screen and (max-width: 1024px); +@import url(http://some/path/to/css3.css) supports(display: grid) screen and + (max-width: 400px); +@import url(http://some/path/to/css4.css) supports(display: grid); +@import url(http://some/path/to/css5.css) layer; +@import url(http://some/path/to/css6.css) layer; +@import url(http://some/path/to/css7.css) layer(layer-name) supports(display: grid) screen and (max-width: 1024px); +@import url(http://some/path/to/css8.css) layer(layer-name) screen and + (max-width: 1024px); +@import url(https://some/external/css); +body { + background: red; +} + +.b { + background: red; +} + diff --git a/test/cases/at-import-external-with-media/index.js b/test/cases/at-import-external-with-media/index.js new file mode 100644 index 00000000..5337afb9 --- /dev/null +++ b/test/cases/at-import-external-with-media/index.js @@ -0,0 +1,2 @@ +import "./a.css"; +import "./b.css"; diff --git a/test/cases/at-import-external-with-media/webpack.config.js b/test/cases/at-import-external-with-media/webpack.config.js new file mode 100644 index 00000000..cf55c08c --- /dev/null +++ b/test/cases/at-import-external-with-media/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/at-import-in-the-entry/a.css b/test/cases/at-import-in-the-entry/a.css new file mode 100644 index 00000000..08e2283e --- /dev/null +++ b/test/cases/at-import-in-the-entry/a.css @@ -0,0 +1,3 @@ +body { + font-family: "Manrope"; +} diff --git a/test/cases/at-import-in-the-entry/b.css b/test/cases/at-import-in-the-entry/b.css new file mode 100644 index 00000000..0fb8a848 --- /dev/null +++ b/test/cases/at-import-in-the-entry/b.css @@ -0,0 +1 @@ +@import url(https://fonts.googleapis.com/css2?family=Manrope:wght@500;800&display=swap); diff --git a/test/cases/at-import-in-the-entry/expected/main.css b/test/cases/at-import-in-the-entry/expected/main.css new file mode 100644 index 00000000..84ddaec9 --- /dev/null +++ b/test/cases/at-import-in-the-entry/expected/main.css @@ -0,0 +1,16 @@ +/*!****************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./b.css ***! + \****************************************************************/ +@import url(https://fonts.googleapis.com/css2?family=Manrope:wght@500;800&display=swap); +/*!****************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./a.css ***! + \****************************************************************/ +body { + font-family: "Manrope"; +} + +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./b.css (1) ***! + \********************************************************************/ + + diff --git a/test/cases/at-import-in-the-entry/webpack.config.js b/test/cases/at-import-in-the-entry/webpack.config.js new file mode 100644 index 00000000..254b176d --- /dev/null +++ b/test/cases/at-import-in-the-entry/webpack.config.js @@ -0,0 +1,22 @@ +import Self from "../../../src"; + +module.exports = { + mode: "development", + entry: ["./a.css", "./b.css"], + output: { + pathinfo: true, + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/at-import-in-the-middle/a.css b/test/cases/at-import-in-the-middle/a.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/at-import-in-the-middle/a.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/at-import-in-the-middle/b.css b/test/cases/at-import-in-the-middle/b.css new file mode 100644 index 00000000..5e0da74e --- /dev/null +++ b/test/cases/at-import-in-the-middle/b.css @@ -0,0 +1,9 @@ +.b { + background: red; +} + +@import url("https://some/external/css"); + +.b { + color: yellow; +} diff --git a/test/cases/at-import-in-the-middle/c.css b/test/cases/at-import-in-the-middle/c.css new file mode 100644 index 00000000..7760f9b4 --- /dev/null +++ b/test/cases/at-import-in-the-middle/c.css @@ -0,0 +1,9 @@ +.c { + background: red; +} +@import "https://github.com/a.css"; +@import url("https://some/other/external/css"); + +.c { + color: yellow; +} diff --git a/test/cases/at-import-in-the-middle/expected/main.css b/test/cases/at-import-in-the-middle/expected/main.css new file mode 100644 index 00000000..6f77cc07 --- /dev/null +++ b/test/cases/at-import-in-the-middle/expected/main.css @@ -0,0 +1,24 @@ +@import url(https://some/other/external/css); +@import url(https://some/external/css); +body { + background: red; +} + +.c { + background: red; +} + +.c { + color: yellow; +} + +.b { + background: red; +} + +.b { + color: yellow; +} + + + diff --git a/test/cases/at-import-in-the-middle/index.css b/test/cases/at-import-in-the-middle/index.css new file mode 100644 index 00000000..1d835e13 --- /dev/null +++ b/test/cases/at-import-in-the-middle/index.css @@ -0,0 +1,2 @@ +@import "https://github.com/c.css"; +@import "https://github.com/b.css"; diff --git a/test/cases/at-import-in-the-middle/webpack.config.js b/test/cases/at-import-in-the-middle/webpack.config.js new file mode 100644 index 00000000..bebf16ef --- /dev/null +++ b/test/cases/at-import-in-the-middle/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.css", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/at-import-layer/expected/main.css b/test/cases/at-import-layer/expected/main.css new file mode 100644 index 00000000..3e7d1c11 --- /dev/null +++ b/test/cases/at-import-layer/expected/main.css @@ -0,0 +1,48 @@ +@layer framework { +@layer base {.bottom { + background: blue; +} +} +} +@layer framework { +@layer base { + .middle { + background: green; + } +} + +} +@layer { +.color { + color: red; +} + +} +@supports (display: flex) { +@media (prefers-color-scheme: dark) { +@layer default { +@supports (display: grid) {@media screen and (min-width: 900px) {@layer base {.foo { + color: red; +} +}}} +} +} +} +@supports (display: flex) { +@media (prefers-color-scheme: dark) { +@layer default { +/* prettier-ignore */ + +.bar { + color: blue; +} + +} +} +} +/* prettier-ignore */ + +.top { + background: red; +} + diff --git a/test/cases/at-import-layer/import-with-layer-and-supports-and-media.css b/test/cases/at-import-layer/import-with-layer-and-supports-and-media.css new file mode 100644 index 00000000..bafd2b49 --- /dev/null +++ b/test/cases/at-import-layer/import-with-layer-and-supports-and-media.css @@ -0,0 +1,6 @@ +/* prettier-ignore */ +@import url("https://github.com/zzz.css") layer(base) supports(display: grid) screen and (min-width: 900px); + +.bar { + color: blue; +} diff --git a/test/cases/at-import-layer/import-with-layer.css b/test/cases/at-import-layer/import-with-layer.css new file mode 100644 index 00000000..171269b8 --- /dev/null +++ b/test/cases/at-import-layer/import-with-layer.css @@ -0,0 +1,7 @@ +@import url("https://github.com/test.css") layer(base); + +@layer base { + .middle { + background: green; + } +} diff --git a/test/cases/at-import-layer/index.js b/test/cases/at-import-layer/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/at-import-layer/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/at-import-layer/style.css b/test/cases/at-import-layer/style.css new file mode 100644 index 00000000..f2579baa --- /dev/null +++ b/test/cases/at-import-layer/style.css @@ -0,0 +1,8 @@ +@import url("https://github.com/import-with-layer.css") layer(framework); +@import url("https://github.com/unnamed-layer.css") layer; +/* prettier-ignore */ +@import url("https://github.com/import-with-layer-and-supports-and-media.css") layer(default) supports(display: flex) (prefers-color-scheme: dark); + +.top { + background: red; +} diff --git a/test/cases/at-import-layer/test.css b/test/cases/at-import-layer/test.css new file mode 100644 index 00000000..b704b96d --- /dev/null +++ b/test/cases/at-import-layer/test.css @@ -0,0 +1,3 @@ +.bottom { + background: blue; +} diff --git a/test/cases/at-import-layer/unnamed-layer.css b/test/cases/at-import-layer/unnamed-layer.css new file mode 100644 index 00000000..d005c9f3 --- /dev/null +++ b/test/cases/at-import-layer/unnamed-layer.css @@ -0,0 +1,3 @@ +.color { + color: red; +} diff --git a/test/cases/at-import-layer/webpack.config.js b/test/cases/at-import-layer/webpack.config.js new file mode 100644 index 00000000..cf55c08c --- /dev/null +++ b/test/cases/at-import-layer/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/at-import-layer/zzz.css b/test/cases/at-import-layer/zzz.css new file mode 100644 index 00000000..a15c877a --- /dev/null +++ b/test/cases/at-import-layer/zzz.css @@ -0,0 +1,3 @@ +.foo { + color: red; +} diff --git a/test/cases/at-import-supports/expected/main.css b/test/cases/at-import-supports/expected/main.css new file mode 100644 index 00000000..49fa513e --- /dev/null +++ b/test/cases/at-import-supports/expected/main.css @@ -0,0 +1,16 @@ +@supports (display: flex) { +@supports (display: grid) {.bottom { + background: blue; +} +} +} +@supports (display: flex) { +.middle { + background: green; +} + +} +.top { + background: red; +} + diff --git a/test/cases/at-import-supports/import-with-supports.css b/test/cases/at-import-supports/import-with-supports.css new file mode 100644 index 00000000..43479c3d --- /dev/null +++ b/test/cases/at-import-supports/import-with-supports.css @@ -0,0 +1,5 @@ +@import url("https://github.com/test.css") supports(display: grid); + +.middle { + background: green; +} diff --git a/test/cases/at-import-supports/index.js b/test/cases/at-import-supports/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/at-import-supports/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/at-import-supports/style.css b/test/cases/at-import-supports/style.css new file mode 100644 index 00000000..e8300c20 --- /dev/null +++ b/test/cases/at-import-supports/style.css @@ -0,0 +1,5 @@ +@import url("https://github.com/import-with-supports.css") supports(display: flex); + +.top { + background: red; +} diff --git a/test/cases/at-import-supports/test.css b/test/cases/at-import-supports/test.css new file mode 100644 index 00000000..b704b96d --- /dev/null +++ b/test/cases/at-import-supports/test.css @@ -0,0 +1,3 @@ +.bottom { + background: blue; +} diff --git a/test/cases/at-import-supports/webpack.config.js b/test/cases/at-import-supports/webpack.config.js new file mode 100644 index 00000000..cf55c08c --- /dev/null +++ b/test/cases/at-import-supports/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/at-import/a.css b/test/cases/at-import/a.css new file mode 100644 index 00000000..fcc50d64 --- /dev/null +++ b/test/cases/at-import/a.css @@ -0,0 +1,9 @@ +@import "https://github.com/ae.css"; +@import "https://github.com/aa.css"; +@import "https://github.com/ab.css"; +@import "https://github.com/ac.css"; +@import "https://github.com/ad.css"; + +body { + background: red; +} diff --git a/test/cases/at-import/aa.css b/test/cases/at-import/aa.css new file mode 100644 index 00000000..9ad34057 --- /dev/null +++ b/test/cases/at-import/aa.css @@ -0,0 +1,3 @@ +.aa { + background: green; +} diff --git a/test/cases/at-import/ab.css b/test/cases/at-import/ab.css new file mode 100644 index 00000000..a57f2508 --- /dev/null +++ b/test/cases/at-import/ab.css @@ -0,0 +1,3 @@ +.ab { + background: green; +} diff --git a/test/cases/at-import/ac.css b/test/cases/at-import/ac.css new file mode 100644 index 00000000..356d5138 --- /dev/null +++ b/test/cases/at-import/ac.css @@ -0,0 +1,3 @@ +.ac { + background: green; +} diff --git a/test/cases/at-import/ad.css b/test/cases/at-import/ad.css new file mode 100644 index 00000000..1323e35d --- /dev/null +++ b/test/cases/at-import/ad.css @@ -0,0 +1,3 @@ +.ad { + background: green; +} diff --git a/test/cases/at-import/ae.css b/test/cases/at-import/ae.css new file mode 100644 index 00000000..5eca6b0e --- /dev/null +++ b/test/cases/at-import/ae.css @@ -0,0 +1,3 @@ +.ae { + background: green; +} diff --git a/test/cases/at-import/b.css b/test/cases/at-import/b.css new file mode 100644 index 00000000..eab9cbdc --- /dev/null +++ b/test/cases/at-import/b.css @@ -0,0 +1,6 @@ +@import "https://github.com/ba.css"; +@import "https://github.com/bb.css"; + +body { + background: yellow; +} diff --git a/test/cases/at-import/ba.css b/test/cases/at-import/ba.css new file mode 100644 index 00000000..adb84dbe --- /dev/null +++ b/test/cases/at-import/ba.css @@ -0,0 +1,3 @@ +.ba { + background: green; +} diff --git a/test/cases/at-import/bb.css b/test/cases/at-import/bb.css new file mode 100644 index 00000000..1e09c7ac --- /dev/null +++ b/test/cases/at-import/bb.css @@ -0,0 +1,3 @@ +.bb { + background: green; +} diff --git a/test/cases/at-import/expected/main.css b/test/cases/at-import/expected/main.css new file mode 100644 index 00000000..eb4811b4 --- /dev/null +++ b/test/cases/at-import/expected/main.css @@ -0,0 +1,36 @@ +.ae { + background: green; +} + +.aa { + background: green; +} + +.ab { + background: green; +} + +.ac { + background: green; +} + +.ad { + background: green; +} + +body { + background: red; +} + +.ba { + background: green; +} + +.bb { + background: green; +} + +body { + background: yellow; +} + diff --git a/test/cases/at-import/index.js b/test/cases/at-import/index.js new file mode 100644 index 00000000..5337afb9 --- /dev/null +++ b/test/cases/at-import/index.js @@ -0,0 +1,2 @@ +import "./a.css"; +import "./b.css"; diff --git a/test/cases/at-import/webpack.config.js b/test/cases/at-import/webpack.config.js new file mode 100644 index 00000000..cf55c08c --- /dev/null +++ b/test/cases/at-import/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/at-media/a.css b/test/cases/at-media/a.css new file mode 100644 index 00000000..88a63b4b --- /dev/null +++ b/test/cases/at-media/a.css @@ -0,0 +1,3 @@ +body { + font-size: 24px; +} diff --git a/test/cases/at-media/b.css b/test/cases/at-media/b.css new file mode 100644 index 00000000..006df2e2 --- /dev/null +++ b/test/cases/at-media/b.css @@ -0,0 +1,3 @@ +body { + font-size: 32px; +} diff --git a/test/cases/at-media/c.css b/test/cases/at-media/c.css new file mode 100644 index 00000000..a0b43b87 --- /dev/null +++ b/test/cases/at-media/c.css @@ -0,0 +1,3 @@ +body { + font-size: 64px; +} diff --git a/test/cases/at-media/d.css b/test/cases/at-media/d.css new file mode 100644 index 00000000..a809c529 --- /dev/null +++ b/test/cases/at-media/d.css @@ -0,0 +1,3 @@ +body { + font-size: 128px; +} diff --git a/test/cases/at-media/e.css b/test/cases/at-media/e.css new file mode 100644 index 00000000..51aa94f5 --- /dev/null +++ b/test/cases/at-media/e.css @@ -0,0 +1,3 @@ +body { + font-size: 256px; +} diff --git a/test/cases/at-media/expected/main.css b/test/cases/at-media/expected/main.css new file mode 100644 index 00000000..ac12f826 --- /dev/null +++ b/test/cases/at-media/expected/main.css @@ -0,0 +1,40 @@ +body { + font-size: 24px; +} + +@media screen and (orientation: landscape) { +body { + font-size: 32px; +} + +} +/*@import url("https://github.com/c.css") supports(display: flex);*/ +/*@import url("https://github.com/d.css") supports(display: flex) screen and (min-width: 400px);*/ +/*@import url("https://github.com/e.css") supports( display : flex ) screen and ( min-width : 400px ) ;*/ +/*@import url("https://github.com/f.css") supports(not (display: flex));*/ +/*@import url("https://github.com/g.css") SUPPORTS(NOT (DISPLAY: FLEX));*/ + +div { + color: blue; +} + +@media { + div { + color: red; + } +} + +@media screen and (min-width: 900px) { + article { + padding: 1rem 3rem; + } +} + +@supports (display: flex) { + @media screen and (min-width: 900px) { + article { + display: flex; + } + } +} + diff --git a/test/cases/at-media/f.css b/test/cases/at-media/f.css new file mode 100644 index 00000000..4dd03532 --- /dev/null +++ b/test/cases/at-media/f.css @@ -0,0 +1,3 @@ +body { + font-size: 512px; +} diff --git a/test/cases/at-media/g.css b/test/cases/at-media/g.css new file mode 100644 index 00000000..96b5b801 --- /dev/null +++ b/test/cases/at-media/g.css @@ -0,0 +1,3 @@ +body { + font-size: 1024px; +} diff --git a/test/cases/at-media/index.js b/test/cases/at-media/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/at-media/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/at-media/style.css b/test/cases/at-media/style.css new file mode 100644 index 00000000..9bd27193 --- /dev/null +++ b/test/cases/at-media/style.css @@ -0,0 +1,31 @@ +@import url("https://github.com/a.css"); +@import url("https://github.com/b.css") screen and (orientation: landscape); +/*@import url("https://github.com/c.css") supports(display: flex);*/ +/*@import url("https://github.com/d.css") supports(display: flex) screen and (min-width: 400px);*/ +/*@import url("https://github.com/e.css") supports( display : flex ) screen and ( min-width : 400px ) ;*/ +/*@import url("https://github.com/f.css") supports(not (display: flex));*/ +/*@import url("https://github.com/g.css") SUPPORTS(NOT (DISPLAY: FLEX));*/ + +div { + color: blue; +} + +@media { + div { + color: red; + } +} + +@media screen and (min-width: 900px) { + article { + padding: 1rem 3rem; + } +} + +@supports (display: flex) { + @media screen and (min-width: 900px) { + article { + display: flex; + } + } +} diff --git a/test/cases/at-media/webpack.config.js b/test/cases/at-media/webpack.config.js new file mode 100644 index 00000000..f4931bb5 --- /dev/null +++ b/test/cases/at-media/webpack.config.js @@ -0,0 +1,25 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/auxiliary-assets/expected/auxiliaryAssets-815babffe97b00a1f30b.woff2 b/test/cases/auxiliary-assets/expected/auxiliaryAssets-815babffe97b00a1f30b.woff2 new file mode 100644 index 00000000..ddca5526 --- /dev/null +++ b/test/cases/auxiliary-assets/expected/auxiliaryAssets-815babffe97b00a1f30b.woff2 @@ -0,0 +1 @@ +auxiliaryAssets-815babffe97b00a1f30b.woff2 \ No newline at end of file diff --git a/test/cases/auxiliary-assets/expected/auxiliaryAssets-a0de923c946d4ccb38b0.ttf b/test/cases/auxiliary-assets/expected/auxiliaryAssets-a0de923c946d4ccb38b0.ttf new file mode 100644 index 00000000..16502c45 --- /dev/null +++ b/test/cases/auxiliary-assets/expected/auxiliaryAssets-a0de923c946d4ccb38b0.ttf @@ -0,0 +1 @@ +auxiliaryAssets-a0de923c946d4ccb38b0.ttf \ No newline at end of file diff --git a/test/cases/auxiliary-assets/expected/auxiliaryAssets-d4c409dfe110747b1763.woff b/test/cases/auxiliary-assets/expected/auxiliaryAssets-d4c409dfe110747b1763.woff new file mode 100644 index 00000000..deeb500c --- /dev/null +++ b/test/cases/auxiliary-assets/expected/auxiliaryAssets-d4c409dfe110747b1763.woff @@ -0,0 +1 @@ +auxiliaryAssets-d4c409dfe110747b1763.woff \ No newline at end of file diff --git a/test/cases/auxiliary-assets/fonts.css b/test/cases/auxiliary-assets/fonts.css new file mode 100644 index 00000000..22b75b91 --- /dev/null +++ b/test/cases/auxiliary-assets/fonts.css @@ -0,0 +1,12 @@ +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 300; + font-display: swap; + src: + local("Roboto Light"), + local("Roboto-Light"), + url("https://github.com/fonts/roboto-v18-latin-300.woff2") format("woff2"), + url("https://github.com/fonts/roboto-v18-latin-300.woff") format("woff"), + url("https://github.com/fonts/roboto-v18-latin-300.ttf") format("truetype"); +} diff --git a/test/cases/auxiliary-assets/fonts/roboto-v18-latin-300.ttf b/test/cases/auxiliary-assets/fonts/roboto-v18-latin-300.ttf new file mode 100644 index 00000000..a22188ee Binary files /dev/null and b/test/cases/auxiliary-assets/fonts/roboto-v18-latin-300.ttf differ diff --git a/test/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff b/test/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff new file mode 100644 index 00000000..96663f07 Binary files /dev/null and b/test/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff differ diff --git a/test/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff2 b/test/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff2 new file mode 100644 index 00000000..52c5845a Binary files /dev/null and b/test/cases/auxiliary-assets/fonts/roboto-v18-latin-300.woff2 differ diff --git a/test/cases/auxiliary-assets/index.js b/test/cases/auxiliary-assets/index.js new file mode 100644 index 00000000..ccb42f55 --- /dev/null +++ b/test/cases/auxiliary-assets/index.js @@ -0,0 +1 @@ +import "./fonts.css"; diff --git a/test/cases/auxiliary-assets/test.filter.js b/test/cases/auxiliary-assets/test.filter.js new file mode 100644 index 00000000..ba43c58f --- /dev/null +++ b/test/cases/auxiliary-assets/test.filter.js @@ -0,0 +1,3 @@ +import yn from "../../helpers/yn"; + +module.exports = () => yn(process.env.OLD_API); diff --git a/test/cases/auxiliary-assets/webpack.config.js b/test/cases/auxiliary-assets/webpack.config.js new file mode 100644 index 00000000..81d78b60 --- /dev/null +++ b/test/cases/auxiliary-assets/webpack.config.js @@ -0,0 +1,64 @@ +import Self from "../../../src"; + +class AssetsPlugin { + // eslint-disable-next-line class-methods-use-this + apply(compiler) { + compiler.hooks.emit.tapAsync("AssetsPlugin", (compilation, cb) => { + const stats = compilation.getStats().toJson({ + all: true, + }); + + const { RawSource } = compiler.webpack.sources; + + for (const file of stats.entrypoints.main.auxiliaryAssets) { + const newFile = `auxiliaryAssets-${file.name}`; + compilation.emitAsset(newFile, new RawSource(newFile), {}); + } + + cb(); + }); + } +} + +module.exports = { + entry: "./index.js", + mode: "development", + output: { + publicPath: "/", + }, + optimization: { + sideEffects: true, + }, + module: { + rules: [ + { + test: /\.(woff2?|ttf|eot|otf|png|jpe?g|gif|ico|svg|webp)$/, + type: "asset", + }, + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + esModule: true, + }, + }, + { + loader: "css-loader", + options: { + esModule: true, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + chunkFilename: "[id].[name].css", + }), + new AssetsPlugin(), + ], +}; diff --git a/test/cases/base-uri-in-entry/expected/webpack-5-importModule/asset/roboto-v18-latin-300.ttf b/test/cases/base-uri-in-entry/expected/webpack-5-importModule/asset/roboto-v18-latin-300.ttf new file mode 100644 index 00000000..a22188ee Binary files /dev/null and b/test/cases/base-uri-in-entry/expected/webpack-5-importModule/asset/roboto-v18-latin-300.ttf differ diff --git a/test/cases/base-uri-in-entry/expected/webpack-5-importModule/index.css b/test/cases/base-uri-in-entry/expected/webpack-5-importModule/index.css new file mode 100644 index 00000000..67fd017a --- /dev/null +++ b/test/cases/base-uri-in-entry/expected/webpack-5-importModule/index.css @@ -0,0 +1,7 @@ +@font-face { + font-family: Roboto-plp; + font-style: normal; + font-weight: 400; + src: url(/service/my-scheme://uri/assets/asset/roboto-v18-latin-300.ttf) format("truetype"); +} + diff --git a/test/cases/base-uri-in-entry/expected/webpack-5-importModule/index.mjs b/test/cases/base-uri-in-entry/expected/webpack-5-importModule/index.mjs new file mode 100644 index 00000000..139597f9 --- /dev/null +++ b/test/cases/base-uri-in-entry/expected/webpack-5-importModule/index.mjs @@ -0,0 +1,2 @@ + + diff --git a/test/cases/base-uri-in-entry/expected/webpack-5/asset/roboto-v18-latin-300.ttf b/test/cases/base-uri-in-entry/expected/webpack-5/asset/roboto-v18-latin-300.ttf new file mode 100644 index 00000000..a22188ee Binary files /dev/null and b/test/cases/base-uri-in-entry/expected/webpack-5/asset/roboto-v18-latin-300.ttf differ diff --git a/test/cases/base-uri-in-entry/expected/webpack-5/index.css b/test/cases/base-uri-in-entry/expected/webpack-5/index.css new file mode 100644 index 00000000..b8de74d0 --- /dev/null +++ b/test/cases/base-uri-in-entry/expected/webpack-5/index.css @@ -0,0 +1,7 @@ +@font-face { + font-family: Roboto-plp; + font-style: normal; + font-weight: 400; + src: url(https://github.com/assets/asset/roboto-v18-latin-300.ttf) format("truetype"); +} + diff --git a/test/cases/base-uri-in-entry/expected/webpack-5/index.mjs b/test/cases/base-uri-in-entry/expected/webpack-5/index.mjs new file mode 100644 index 00000000..139597f9 --- /dev/null +++ b/test/cases/base-uri-in-entry/expected/webpack-5/index.mjs @@ -0,0 +1,2 @@ + + diff --git a/test/cases/base-uri-in-entry/fonts/roboto-v18-latin-300.ttf b/test/cases/base-uri-in-entry/fonts/roboto-v18-latin-300.ttf new file mode 100644 index 00000000..a22188ee Binary files /dev/null and b/test/cases/base-uri-in-entry/fonts/roboto-v18-latin-300.ttf differ diff --git a/test/cases/base-uri-in-entry/index.js b/test/cases/base-uri-in-entry/index.js new file mode 100644 index 00000000..1bebc0ca --- /dev/null +++ b/test/cases/base-uri-in-entry/index.js @@ -0,0 +1 @@ +import "./main.css"; diff --git a/test/cases/base-uri-in-entry/main.css b/test/cases/base-uri-in-entry/main.css new file mode 100644 index 00000000..fe723a22 --- /dev/null +++ b/test/cases/base-uri-in-entry/main.css @@ -0,0 +1,6 @@ +@font-face { + font-family: Roboto-plp; + font-style: normal; + font-weight: 400; + src: url("https://github.com/fonts/roboto-v18-latin-300.ttf") format("truetype"); +} diff --git a/test/cases/base-uri-in-entry/webpack.config.js b/test/cases/base-uri-in-entry/webpack.config.js new file mode 100644 index 00000000..b1d82c60 --- /dev/null +++ b/test/cases/base-uri-in-entry/webpack.config.js @@ -0,0 +1,48 @@ +import Self from "../../../src"; + +/** + * @type {import('webpack').Configuration} + */ +module.exports = { + mode: "production", + devtool: false, + entry: { + index: { + import: "./index.js", + baseUri: "my-scheme://uri", + }, + }, + optimization: { + minimize: false, + }, + output: { + module: true, + assetModuleFilename: "asset/[name][ext]", + chunkFormat: "module", + chunkLoading: "import", + }, + experiments: { + outputModule: true, + }, + module: { + rules: [ + { + test: /\.css$/i, + use: [ + { + loader: Self.loader, + }, + "css-loader", + ], + }, + { + test: /\.ttf$/i, + type: "asset/resource", + generator: { + publicPath: "/assets/", + }, + }, + ], + }, + plugins: [new Self({ experimentalUseImportModule: true })], +}; diff --git a/test/cases/base-uri/expected/asset/roboto-v18-latin-300.ttf b/test/cases/base-uri/expected/asset/roboto-v18-latin-300.ttf new file mode 100644 index 00000000..a22188ee Binary files /dev/null and b/test/cases/base-uri/expected/asset/roboto-v18-latin-300.ttf differ diff --git a/test/cases/base-uri/expected/index.css b/test/cases/base-uri/expected/index.css new file mode 100644 index 00000000..b8de74d0 --- /dev/null +++ b/test/cases/base-uri/expected/index.css @@ -0,0 +1,7 @@ +@font-face { + font-family: Roboto-plp; + font-style: normal; + font-weight: 400; + src: url(https://github.com/assets/asset/roboto-v18-latin-300.ttf) format("truetype"); +} + diff --git a/test/cases/base-uri/expected/index.mjs b/test/cases/base-uri/expected/index.mjs new file mode 100644 index 00000000..139597f9 --- /dev/null +++ b/test/cases/base-uri/expected/index.mjs @@ -0,0 +1,2 @@ + + diff --git a/test/cases/base-uri/fonts/roboto-v18-latin-300.ttf b/test/cases/base-uri/fonts/roboto-v18-latin-300.ttf new file mode 100644 index 00000000..a22188ee Binary files /dev/null and b/test/cases/base-uri/fonts/roboto-v18-latin-300.ttf differ diff --git a/test/cases/base-uri/index.js b/test/cases/base-uri/index.js new file mode 100644 index 00000000..1bebc0ca --- /dev/null +++ b/test/cases/base-uri/index.js @@ -0,0 +1 @@ +import "./main.css"; diff --git a/test/cases/base-uri/main.css b/test/cases/base-uri/main.css new file mode 100644 index 00000000..fe723a22 --- /dev/null +++ b/test/cases/base-uri/main.css @@ -0,0 +1,6 @@ +@font-face { + font-family: Roboto-plp; + font-style: normal; + font-weight: 400; + src: url("https://github.com/fonts/roboto-v18-latin-300.ttf") format("truetype"); +} diff --git a/test/cases/base-uri/webpack.config.js b/test/cases/base-uri/webpack.config.js new file mode 100644 index 00000000..7027b9d5 --- /dev/null +++ b/test/cases/base-uri/webpack.config.js @@ -0,0 +1,45 @@ +import Self from "../../../src"; + +/** + * @type {import('webpack').Configuration} + */ +module.exports = { + mode: "production", + devtool: false, + entry: { + index: "./index.js", + }, + optimization: { + minimize: false, + }, + output: { + module: true, + assetModuleFilename: "asset/[name][ext]", + chunkFormat: "module", + chunkLoading: "import", + }, + experiments: { + outputModule: true, + }, + module: { + rules: [ + { + test: /\.css$/i, + use: [ + { + loader: Self.loader, + }, + "css-loader", + ], + }, + { + test: /\.ttf$/i, + type: "asset/resource", + generator: { + publicPath: "/assets/", + }, + }, + ], + }, + plugins: [new Self({ experimentalUseImportModule: true })], +}; diff --git a/test/cases/build-in-css-support/expected/main.css b/test/cases/build-in-css-support/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/build-in-css-support/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/build-in-css-support/index.js b/test/cases/build-in-css-support/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/build-in-css-support/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/build-in-css-support/style.css b/test/cases/build-in-css-support/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/build-in-css-support/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/build-in-css-support/warnings.js b/test/cases/build-in-css-support/warnings.js new file mode 100644 index 00000000..404fdef2 --- /dev/null +++ b/test/cases/build-in-css-support/warnings.js @@ -0,0 +1,9 @@ +module.exports = [ + "WARNING in css ./style.css", + "Module Warning (from ../../../node_modules/css-loader/dist/cjs.js):", + 'You can\'t use `experiments.css` (`experiments.futureDefaults` enable built-in CSS support by default) and `css-loader` together, please set `experiments.css` to `false` or set `{ type: "javascript/auto" }` for rules with `css-loader` in your webpack config (now css-loader does nothing).', + "", + "WARNING in css ./style.css", + "Module Warning (from ../../../src/loader.js):", + 'You can\'t use `experiments.css` (`experiments.futureDefaults` enable built-in CSS support by default) and `mini-css-extract-plugin` together, please set `experiments.css` to `false` or set `{ type: "javascript/auto" }` for rules with `mini-css-extract-plugin` in your webpack config (now `mini-css-extract-plugin` does nothing).', +].join("\n"); diff --git a/test/cases/build-in-css-support/webpack.config.js b/test/cases/build-in-css-support/webpack.config.js new file mode 100644 index 00000000..17727ef9 --- /dev/null +++ b/test/cases/build-in-css-support/webpack.config.js @@ -0,0 +1,25 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + output: { + clean: false, + cssFilename: "[name].css", + }, + experiments: { + css: true, + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].extract.css", + }), + ], +}; diff --git a/test/cases/chunkFilename-as-function/async.css b/test/cases/chunkFilename-as-function/async.css new file mode 100644 index 00000000..b1645094 --- /dev/null +++ b/test/cases/chunkFilename-as-function/async.css @@ -0,0 +1,3 @@ +.async { + color: red; +} diff --git a/test/cases/chunkFilename-as-function/expected/0.async.css b/test/cases/chunkFilename-as-function/expected/0.async.css new file mode 100644 index 00000000..e665100a --- /dev/null +++ b/test/cases/chunkFilename-as-function/expected/0.async.css @@ -0,0 +1,4 @@ +.async { + color: red; +} + diff --git a/test/cases/chunkFilename-as-function/expected/main.css b/test/cases/chunkFilename-as-function/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/chunkFilename-as-function/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/chunkFilename-as-function/index.js b/test/cases/chunkFilename-as-function/index.js new file mode 100644 index 00000000..6eca02b4 --- /dev/null +++ b/test/cases/chunkFilename-as-function/index.js @@ -0,0 +1,4 @@ +import "./style.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "async" */ "./async.css"); diff --git a/test/cases/chunkFilename-as-function/style.css b/test/cases/chunkFilename-as-function/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/chunkFilename-as-function/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/chunkFilename-as-function/webpack.config.js b/test/cases/chunkFilename-as-function/webpack.config.js new file mode 100644 index 00000000..f836622f --- /dev/null +++ b/test/cases/chunkFilename-as-function/webpack.config.js @@ -0,0 +1,19 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + chunkFilename: ({ chunk }) => `${chunk.id}.${chunk.name}.css`, + }), + ], +}; diff --git a/test/cases/chunkFilename-fullhash/async.css b/test/cases/chunkFilename-fullhash/async.css new file mode 100644 index 00000000..b1645094 --- /dev/null +++ b/test/cases/chunkFilename-fullhash/async.css @@ -0,0 +1,3 @@ +.async { + color: red; +} diff --git a/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/0.656f51af10a65a287c7e.css b/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/0.656f51af10a65a287c7e.css new file mode 100644 index 00000000..e665100a --- /dev/null +++ b/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/0.656f51af10a65a287c7e.css @@ -0,0 +1,4 @@ +.async { + color: red; +} + diff --git a/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/656f51af10a65a287c7e.css b/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/656f51af10a65a287c7e.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/656f51af10a65a287c7e.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/async.js b/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/async.js new file mode 100644 index 00000000..0aad0f24 --- /dev/null +++ b/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/async.js @@ -0,0 +1,13 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[0],{ + +/***/ 2: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/main.js b/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/main.js new file mode 100644 index 00000000..db7525df --- /dev/null +++ b/test/cases/chunkFilename-fullhash/expected/webpack-5-importModule/main.js @@ -0,0 +1,365 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + "async" + ".js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get mini-css chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.miniCssF = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + "." + __webpack_require__.h() + ".css"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/getFullHash */ +/******/ (() => { +/******/ __webpack_require__.h = () => ("656f51af10a65a287c7e") +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/css loading */ +/******/ (() => { +/******/ if (typeof document === "undefined") return; +/******/ var createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => { +/******/ var linkTag = document.createElement("link"); +/******/ +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ if (__webpack_require__.nc) { +/******/ linkTag.nonce = __webpack_require__.nc; +/******/ } +/******/ var onLinkComplete = (event) => { +/******/ // avoid mem leaks. +/******/ linkTag.onerror = linkTag.onload = null; +/******/ if (event.type === 'load') { +/******/ resolve(); +/******/ } else { +/******/ var errorType = event && event.type; +/******/ var realHref = event && event.target && event.target.href || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + errorType + ": " + realHref + ")"); +/******/ err.name = "ChunkLoadError"; +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.type = errorType; +/******/ err.request = realHref; +/******/ if (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ } +/******/ } +/******/ linkTag.onerror = linkTag.onload = onLinkComplete; +/******/ linkTag.href = fullhref; +/******/ +/******/ +/******/ if (oldTag) { +/******/ oldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling); +/******/ } else { +/******/ document.head.appendChild(linkTag); +/******/ } +/******/ return linkTag; +/******/ }; +/******/ var findStylesheet = (href, fullhref) => { +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag; +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return tag; +/******/ } +/******/ }; +/******/ var loadStylesheet = (chunkId) => { +/******/ return new Promise((resolve, reject) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ if(findStylesheet(href, fullhref)) return resolve(); +/******/ createStylesheet(chunkId, fullhref, null, resolve, reject); +/******/ }); +/******/ } +/******/ // object to store loaded CSS chunks +/******/ var installedCssChunks = { +/******/ 1: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.miniCss = (chunkId, promises) => { +/******/ var cssChunks = {"0":1}; +/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); +/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { +/******/ promises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => { +/******/ installedCssChunks[chunkId] = 0; +/******/ }, (e) => { +/******/ delete installedCssChunks[chunkId]; +/******/ throw e; +/******/ })); +/******/ } +/******/ }; +/******/ +/******/ // no hmr +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 1: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +/* eslint-disable-next-line no-unused-expressions */ +__webpack_require__.e(/* import() | async */ 0).then(__webpack_require__.bind(__webpack_require__, 2)); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/chunkFilename-fullhash/expected/webpack-5/0.ff368441c28faebc6a1c.css b/test/cases/chunkFilename-fullhash/expected/webpack-5/0.ff368441c28faebc6a1c.css new file mode 100644 index 00000000..e665100a --- /dev/null +++ b/test/cases/chunkFilename-fullhash/expected/webpack-5/0.ff368441c28faebc6a1c.css @@ -0,0 +1,4 @@ +.async { + color: red; +} + diff --git a/test/cases/chunkFilename-fullhash/expected/webpack-5/async.js b/test/cases/chunkFilename-fullhash/expected/webpack-5/async.js new file mode 100644 index 00000000..0aad0f24 --- /dev/null +++ b/test/cases/chunkFilename-fullhash/expected/webpack-5/async.js @@ -0,0 +1,13 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[0],{ + +/***/ 2: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/chunkFilename-fullhash/expected/webpack-5/ff368441c28faebc6a1c.css b/test/cases/chunkFilename-fullhash/expected/webpack-5/ff368441c28faebc6a1c.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/chunkFilename-fullhash/expected/webpack-5/ff368441c28faebc6a1c.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/chunkFilename-fullhash/expected/webpack-5/main.js b/test/cases/chunkFilename-fullhash/expected/webpack-5/main.js new file mode 100644 index 00000000..652c9a76 --- /dev/null +++ b/test/cases/chunkFilename-fullhash/expected/webpack-5/main.js @@ -0,0 +1,365 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + "async" + ".js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get mini-css chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.miniCssF = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + "." + __webpack_require__.h() + ".css"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/getFullHash */ +/******/ (() => { +/******/ __webpack_require__.h = () => ("ff368441c28faebc6a1c") +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/css loading */ +/******/ (() => { +/******/ if (typeof document === "undefined") return; +/******/ var createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => { +/******/ var linkTag = document.createElement("link"); +/******/ +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ if (__webpack_require__.nc) { +/******/ linkTag.nonce = __webpack_require__.nc; +/******/ } +/******/ var onLinkComplete = (event) => { +/******/ // avoid mem leaks. +/******/ linkTag.onerror = linkTag.onload = null; +/******/ if (event.type === 'load') { +/******/ resolve(); +/******/ } else { +/******/ var errorType = event && event.type; +/******/ var realHref = event && event.target && event.target.href || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + errorType + ": " + realHref + ")"); +/******/ err.name = "ChunkLoadError"; +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.type = errorType; +/******/ err.request = realHref; +/******/ if (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ } +/******/ } +/******/ linkTag.onerror = linkTag.onload = onLinkComplete; +/******/ linkTag.href = fullhref; +/******/ +/******/ +/******/ if (oldTag) { +/******/ oldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling); +/******/ } else { +/******/ document.head.appendChild(linkTag); +/******/ } +/******/ return linkTag; +/******/ }; +/******/ var findStylesheet = (href, fullhref) => { +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag; +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return tag; +/******/ } +/******/ }; +/******/ var loadStylesheet = (chunkId) => { +/******/ return new Promise((resolve, reject) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ if(findStylesheet(href, fullhref)) return resolve(); +/******/ createStylesheet(chunkId, fullhref, null, resolve, reject); +/******/ }); +/******/ } +/******/ // object to store loaded CSS chunks +/******/ var installedCssChunks = { +/******/ 1: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.miniCss = (chunkId, promises) => { +/******/ var cssChunks = {"0":1}; +/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); +/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { +/******/ promises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => { +/******/ installedCssChunks[chunkId] = 0; +/******/ }, (e) => { +/******/ delete installedCssChunks[chunkId]; +/******/ throw e; +/******/ })); +/******/ } +/******/ }; +/******/ +/******/ // no hmr +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 1: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +/* eslint-disable-next-line no-unused-expressions */ +__webpack_require__.e(/* import() | async */ 0).then(__webpack_require__.bind(__webpack_require__, 2)); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/chunkFilename-fullhash/index.js b/test/cases/chunkFilename-fullhash/index.js new file mode 100644 index 00000000..6eca02b4 --- /dev/null +++ b/test/cases/chunkFilename-fullhash/index.js @@ -0,0 +1,4 @@ +import "./style.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "async" */ "./async.css"); diff --git a/test/cases/chunkFilename-fullhash/style.css b/test/cases/chunkFilename-fullhash/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/chunkFilename-fullhash/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/chunkFilename-fullhash/webpack.config.js b/test/cases/chunkFilename-fullhash/webpack.config.js new file mode 100644 index 00000000..17eb927b --- /dev/null +++ b/test/cases/chunkFilename-fullhash/webpack.config.js @@ -0,0 +1,19 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[fullhash].css", + chunkFilename: "[id].[fullhash].css", + }), + ], +}; diff --git a/test/cases/chunkFilename/async.css b/test/cases/chunkFilename/async.css new file mode 100644 index 00000000..b1645094 --- /dev/null +++ b/test/cases/chunkFilename/async.css @@ -0,0 +1,3 @@ +.async { + color: red; +} diff --git a/test/cases/chunkFilename/expected/0.async.css b/test/cases/chunkFilename/expected/0.async.css new file mode 100644 index 00000000..e665100a --- /dev/null +++ b/test/cases/chunkFilename/expected/0.async.css @@ -0,0 +1,4 @@ +.async { + color: red; +} + diff --git a/test/cases/chunkFilename/expected/main.css b/test/cases/chunkFilename/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/chunkFilename/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/chunkFilename/index.js b/test/cases/chunkFilename/index.js new file mode 100644 index 00000000..6eca02b4 --- /dev/null +++ b/test/cases/chunkFilename/index.js @@ -0,0 +1,4 @@ +import "./style.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "async" */ "./async.css"); diff --git a/test/cases/chunkFilename/style.css b/test/cases/chunkFilename/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/chunkFilename/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/chunkFilename/webpack.config.js b/test/cases/chunkFilename/webpack.config.js new file mode 100644 index 00000000..60efe871 --- /dev/null +++ b/test/cases/chunkFilename/webpack.config.js @@ -0,0 +1,19 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + chunkFilename: "[id].[name].css", + }), + ], +}; diff --git a/test/cases/commonjs-module-syntax/expected/main.css b/test/cases/commonjs-module-syntax/expected/main.css new file mode 100644 index 00000000..a296d763 --- /dev/null +++ b/test/cases/commonjs-module-syntax/expected/main.css @@ -0,0 +1,12 @@ +.foo__style__a { + background: red; +} + +.foo__style__b { + color: green; +} + +.c { + color: blue; +} + diff --git a/test/cases/commonjs-module-syntax/index.js b/test/cases/commonjs-module-syntax/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/commonjs-module-syntax/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/commonjs-module-syntax/style.css b/test/cases/commonjs-module-syntax/style.css new file mode 100644 index 00000000..ca57f5fe --- /dev/null +++ b/test/cases/commonjs-module-syntax/style.css @@ -0,0 +1,11 @@ +.a { + background: red; +} + +:local(.b) { + color: green; +} + +:global(.c) { + color: blue; +} diff --git a/test/cases/commonjs-module-syntax/webpack.config.js b/test/cases/commonjs-module-syntax/webpack.config.js new file mode 100644 index 00000000..7bde7d86 --- /dev/null +++ b/test/cases/commonjs-module-syntax/webpack.config.js @@ -0,0 +1,32 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { esModule: false }, + }, + { + loader: "css-loader", + options: { + modules: { + mode: "local", + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/composes-async/async-1.css b/test/cases/composes-async/async-1.css index 0cd611ac..41ae9f37 100644 --- a/test/cases/composes-async/async-1.css +++ b/test/cases/composes-async/async-1.css @@ -1,4 +1,4 @@ :local .base { - composes: composed from './async-2.css'; + composes: composed from "./async-2.css"; background: blue; } diff --git a/test/cases/composes-async/expected/1.css b/test/cases/composes-async/expected/async-1.css similarity index 100% rename from test/cases/composes-async/expected/1.css rename to test/cases/composes-async/expected/async-1.css diff --git a/test/cases/composes-async/expected/3.css b/test/cases/composes-async/expected/dedupe.css similarity index 100% rename from test/cases/composes-async/expected/3.css rename to test/cases/composes-async/expected/dedupe.css diff --git a/test/cases/composes-async/index.js b/test/cases/composes-async/index.js index b9f79b90..3bbe1838 100644 --- a/test/cases/composes-async/index.js +++ b/test/cases/composes-async/index.js @@ -1,2 +1,4 @@ -import('./async-1.css'); -import('./async-2.css'); +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "async-1" */ "./async-1.css"); +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "async-2" */ "./async-2.css"); diff --git a/test/cases/composes-async/webpack.config.js b/test/cases/composes-async/webpack.config.js index ef38e7f6..b7881622 100644 --- a/test/cases/composes-async/webpack.config.js +++ b/test/cases/composes-async/webpack.config.js @@ -1,7 +1,7 @@ -const Self = require('../../../'); +import Self from "../../../src"; module.exports = { - entry: './index.js', + entry: "./index.js", module: { rules: [ { @@ -9,11 +9,13 @@ module.exports = { use: [ Self.loader, { - loader: 'css-loader', + loader: "css-loader", options: { - localIdentName: '[local]' - } - } + modules: { + localIdentName: "[local]", + }, + }, + }, ], }, ], @@ -23,16 +25,17 @@ module.exports = { cacheGroups: { cssDedupe: { test: /\.css$/, - chunks: 'all', + name: "dedupe", + chunks: "all", minChunks: 2, - enforce: true - } - } - } + enforce: true, + }, + }, + }, }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", }), ], }; diff --git a/test/cases/content-entries-with-same-import/expected/1.88fb74fe1cb22093f204.css b/test/cases/content-entries-with-same-import/expected/1.88fb74fe1cb22093f204.css new file mode 100644 index 00000000..f6a43c7e --- /dev/null +++ b/test/cases/content-entries-with-same-import/expected/1.88fb74fe1cb22093f204.css @@ -0,0 +1,8 @@ +.a { + width: 100px; +} + +.b { + width: 100px; +} + diff --git a/test/cases/content-entries-with-same-import/expected/2.52b14831e64cae07fa20.css b/test/cases/content-entries-with-same-import/expected/2.52b14831e64cae07fa20.css new file mode 100644 index 00000000..c40231b8 --- /dev/null +++ b/test/cases/content-entries-with-same-import/expected/2.52b14831e64cae07fa20.css @@ -0,0 +1,8 @@ +.b { + width: 100px; +} + +.a { + width: 100px; +} + diff --git a/test/cases/content-entries-with-same-import/index.js b/test/cases/content-entries-with-same-import/index.js new file mode 100644 index 00000000..9f79e91b --- /dev/null +++ b/test/cases/content-entries-with-same-import/index.js @@ -0,0 +1,7 @@ +const app1 = import("./one"); +const app2 = import("./two"); + +// eslint-disable-next-line no-console +console.log(app1); +// eslint-disable-next-line no-console +console.log(app2); diff --git a/test/cases/content-entries-with-same-import/one.js b/test/cases/content-entries-with-same-import/one.js new file mode 100644 index 00000000..66fdbaa9 --- /dev/null +++ b/test/cases/content-entries-with-same-import/one.js @@ -0,0 +1,4 @@ +import "./style1.css"; +import "./style2.css"; + +export default "one"; diff --git a/test/cases/content-entries-with-same-import/style1.css b/test/cases/content-entries-with-same-import/style1.css new file mode 100644 index 00000000..6e0b4761 --- /dev/null +++ b/test/cases/content-entries-with-same-import/style1.css @@ -0,0 +1,3 @@ +.a { + width: 100px; +} diff --git a/test/cases/content-entries-with-same-import/style2.css b/test/cases/content-entries-with-same-import/style2.css new file mode 100644 index 00000000..16518354 --- /dev/null +++ b/test/cases/content-entries-with-same-import/style2.css @@ -0,0 +1,3 @@ +.b { + width: 100px; +} diff --git a/test/cases/content-entries-with-same-import/two.js b/test/cases/content-entries-with-same-import/two.js new file mode 100644 index 00000000..952a31e5 --- /dev/null +++ b/test/cases/content-entries-with-same-import/two.js @@ -0,0 +1,4 @@ +import "./style2.css"; +import "./style1.css"; + +export default "two"; diff --git a/test/cases/content-entries-with-same-import/webpack.config.js b/test/cases/content-entries-with-same-import/webpack.config.js new file mode 100644 index 00000000..7681d343 --- /dev/null +++ b/test/cases/content-entries-with-same-import/webpack.config.js @@ -0,0 +1,21 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + output: { + filename: "[name].[contenthash].js", + }, + plugins: [ + new Self({ + filename: "[name].[contenthash].css", + }), + ], +}; diff --git a/test/cases/contenthash-1/expected/main.8c5b220bf6f482881a90.css b/test/cases/contenthash-1/expected/main.8c5b220bf6f482881a90.css new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/test/cases/contenthash-1/expected/main.8c5b220bf6f482881a90.css @@ -0,0 +1 @@ + diff --git a/test/cases/contenthash-1/index.js b/test/cases/contenthash-1/index.js new file mode 100644 index 00000000..95594dc5 --- /dev/null +++ b/test/cases/contenthash-1/index.js @@ -0,0 +1,3 @@ +/* eslint-disable */ +async () => await import("./lib.js"); +import "./style.css"; diff --git a/test/cases/contenthash-1/lib.js b/test/cases/contenthash-1/lib.js new file mode 100644 index 00000000..e69de29b diff --git a/test/cases/contenthash-1/style.css b/test/cases/contenthash-1/style.css new file mode 100644 index 00000000..e69de29b diff --git a/test/cases/contenthash-1/webpack.config.js b/test/cases/contenthash-1/webpack.config.js new file mode 100644 index 00000000..5b1b9ce4 --- /dev/null +++ b/test/cases/contenthash-1/webpack.config.js @@ -0,0 +1,25 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + mode: "production", + cache: { + type: "filesystem", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + output: { + filename: "[name].[contenthash].js", + }, + plugins: [ + new Self({ + filename: "[name].[contenthash].css", + }), + ], +}; diff --git a/test/cases/contenthash-multiple-entries/entryA.js b/test/cases/contenthash-multiple-entries/entryA.js new file mode 100644 index 00000000..c1845fd4 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/entryA.js @@ -0,0 +1,2 @@ +import "./styleA.css"; +import "./styleB.css"; diff --git a/test/cases/contenthash-multiple-entries/entryB.js b/test/cases/contenthash-multiple-entries/entryB.js new file mode 100644 index 00000000..e5558621 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/entryB.js @@ -0,0 +1 @@ +import "./styleA.css"; diff --git a/test/cases/contenthash-multiple-entries/entryC.js b/test/cases/contenthash-multiple-entries/entryC.js new file mode 100644 index 00000000..e69de29b diff --git a/test/cases/contenthash-multiple-entries/entryD.js b/test/cases/contenthash-multiple-entries/entryD.js new file mode 100644 index 00000000..c1845fd4 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/entryD.js @@ -0,0 +1,2 @@ +import "./styleA.css"; +import "./styleB.css"; diff --git a/test/cases/contenthash-multiple-entries/entryE.js b/test/cases/contenthash-multiple-entries/entryE.js new file mode 100644 index 00000000..11bc2609 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/entryE.js @@ -0,0 +1,2 @@ +import "./styleC.css"; +import "./styleD.css"; diff --git a/test/cases/contenthash-multiple-entries/expected/1cd4a7654bac4107104f.css b/test/cases/contenthash-multiple-entries/expected/1cd4a7654bac4107104f.css new file mode 100644 index 00000000..c6856116 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/expected/1cd4a7654bac4107104f.css @@ -0,0 +1,8 @@ +.styleA { + background: red; +} + +.styleB { + background: blue; +} + diff --git a/test/cases/contenthash-multiple-entries/expected/788f5dc856f2e114b45c.css b/test/cases/contenthash-multiple-entries/expected/788f5dc856f2e114b45c.css new file mode 100644 index 00000000..95d70a8e --- /dev/null +++ b/test/cases/contenthash-multiple-entries/expected/788f5dc856f2e114b45c.css @@ -0,0 +1,4 @@ +.styleA { + background: red; +} + diff --git a/test/cases/contenthash-multiple-entries/styleA.css b/test/cases/contenthash-multiple-entries/styleA.css new file mode 100644 index 00000000..ab12e311 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/styleA.css @@ -0,0 +1,3 @@ +.styleA { + background: red; +} diff --git a/test/cases/contenthash-multiple-entries/styleB.css b/test/cases/contenthash-multiple-entries/styleB.css new file mode 100644 index 00000000..857b0908 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/styleB.css @@ -0,0 +1,3 @@ +.styleB { + background: blue; +} diff --git a/test/cases/contenthash-multiple-entries/styleC.css b/test/cases/contenthash-multiple-entries/styleC.css new file mode 100644 index 00000000..ab12e311 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/styleC.css @@ -0,0 +1,3 @@ +.styleA { + background: red; +} diff --git a/test/cases/contenthash-multiple-entries/styleD.css b/test/cases/contenthash-multiple-entries/styleD.css new file mode 100644 index 00000000..857b0908 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/styleD.css @@ -0,0 +1,3 @@ +.styleB { + background: blue; +} diff --git a/test/cases/contenthash-multiple-entries/webpack.config.js b/test/cases/contenthash-multiple-entries/webpack.config.js new file mode 100644 index 00000000..eebe88a2 --- /dev/null +++ b/test/cases/contenthash-multiple-entries/webpack.config.js @@ -0,0 +1,27 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + entryA: "./entryA.js", + entryB: "./entryB.js", + entryC: "./entryC.js", + entryD: "./entryD.js", + entryE: "./entryE.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + output: { + filename: "[name]-[contenthash].js", + }, + plugins: [ + new Self({ + filename: "[contenthash].css", + }), + ], +}; diff --git a/test/cases/contenthash/expected/1.main.a45a4571ab5cece12cf0.css b/test/cases/contenthash/expected/1.main.a45a4571ab5cece12cf0.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/contenthash/expected/1.main.a45a4571ab5cece12cf0.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/contenthash/expected/1.main.eaf8d14ae542d0855a7d.css b/test/cases/contenthash/expected/1.main.eaf8d14ae542d0855a7d.css deleted file mode 100644 index aea53e43..00000000 --- a/test/cases/contenthash/expected/1.main.eaf8d14ae542d0855a7d.css +++ /dev/null @@ -1,2 +0,0 @@ -body { background: red; } - diff --git a/test/cases/contenthash/expected/2.main.ae0f5d087b9f049f864a.css b/test/cases/contenthash/expected/2.main.ae0f5d087b9f049f864a.css deleted file mode 100644 index 1a6052d7..00000000 --- a/test/cases/contenthash/expected/2.main.ae0f5d087b9f049f864a.css +++ /dev/null @@ -1,2 +0,0 @@ -body { background: green; } - diff --git a/test/cases/contenthash/expected/2.main.c282a646790b09956021.css b/test/cases/contenthash/expected/2.main.c282a646790b09956021.css new file mode 100644 index 00000000..ec3b88b5 --- /dev/null +++ b/test/cases/contenthash/expected/2.main.c282a646790b09956021.css @@ -0,0 +1,4 @@ +body { + background: green; +} + diff --git a/test/cases/contenthash/index.js b/test/cases/contenthash/index.js index aa3357bf..6392568d 100644 --- a/test/cases/contenthash/index.js +++ b/test/cases/contenthash/index.js @@ -1 +1,2 @@ -import './style.css'; +// eslint-disable-next-line import/no-unresolved +import "./style.css"; diff --git a/test/cases/contenthash/style1.css b/test/cases/contenthash/style1.css index 31fc5b8a..67ce83e4 100644 --- a/test/cases/contenthash/style1.css +++ b/test/cases/contenthash/style1.css @@ -1 +1,3 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/contenthash/style2.css b/test/cases/contenthash/style2.css index 56af6df5..90439bac 100644 --- a/test/cases/contenthash/style2.css +++ b/test/cases/contenthash/style2.css @@ -1 +1,3 @@ -body { background: green; } +body { + background: green; +} diff --git a/test/cases/contenthash/webpack.config.js b/test/cases/contenthash/webpack.config.js index 213bcc8d..59681eef 100644 --- a/test/cases/contenthash/webpack.config.js +++ b/test/cases/contenthash/webpack.config.js @@ -1,29 +1,28 @@ -const Self = require('../../../'); +import Self from "../../../src"; -module.exports = [1, 2].map(n => ({ - entry: './index.js', - module: { - rules: [ - { - test: /\.css$/, - use: [ - Self.loader, - 'css-loader', - ], +module.exports = [1, 2].map((n) => { + return { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + output: { + filename: `${n}.[name].js`, + }, + resolve: { + alias: { + "./style.css": `./style${n}.css`, }, + }, + plugins: [ + new Self({ + filename: `${n}.[name].[contenthash].css`, + }), ], - }, - output: { - filename: `${n}.[name].js` - }, - resolve: { - alias: { - './style.css': `./style${n}.css` - } - }, - plugins: [ - new Self({ - filename: `${n}.[name].[contenthash].css`, - }), - ], -})); + }; +}); diff --git a/test/cases/custom-loader-with-functional-exports/app/index.js b/test/cases/custom-loader-with-functional-exports/app/index.js new file mode 100644 index 00000000..7a1999bb --- /dev/null +++ b/test/cases/custom-loader-with-functional-exports/app/index.js @@ -0,0 +1,4 @@ +import { cnA, cnB } from "./style.css"; + +// eslint-disable-next-line no-console +console.log(cnA(), cnB()); diff --git a/test/cases/custom-loader-with-functional-exports/app/mockLoader.js b/test/cases/custom-loader-with-functional-exports/app/mockLoader.js new file mode 100644 index 00000000..0d70c763 --- /dev/null +++ b/test/cases/custom-loader-with-functional-exports/app/mockLoader.js @@ -0,0 +1,14 @@ +export default function loader() { + const callback = this.async(); + + callback( + null, + `export default [ + [module.id, ".class-name-a {background: red;}", ""], + [module.id, ".class-name-b {background: blue;}", ""], +]; + +export var cnA = () => "class-name-a"; +export var cnB = () => "class-name-b";`, + ); +} diff --git a/test/cases/custom-loader-with-functional-exports/app/style.css b/test/cases/custom-loader-with-functional-exports/app/style.css new file mode 100644 index 00000000..ce7bd16d --- /dev/null +++ b/test/cases/custom-loader-with-functional-exports/app/style.css @@ -0,0 +1,7 @@ +.class-name-a { + background: red; +} + +.class-name-b { + background: blue; +} diff --git a/test/cases/custom-loader-with-functional-exports/expected/main.css b/test/cases/custom-loader-with-functional-exports/expected/main.css new file mode 100644 index 00000000..b45259b8 --- /dev/null +++ b/test/cases/custom-loader-with-functional-exports/expected/main.css @@ -0,0 +1,2 @@ +.class-name-a {background: red;} +.class-name-b {background: blue;} diff --git a/test/cases/custom-loader-with-functional-exports/expected/main.js b/test/cases/custom-loader-with-functional-exports/expected/main.js new file mode 100644 index 00000000..a8a168f4 --- /dev/null +++ b/test/cases/custom-loader-with-functional-exports/expected/main.js @@ -0,0 +1,89 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ cnA: () => (/* binding */ _1), +/* harmony export */ cnB: () => (/* binding */ _2) +/* harmony export */ }); +// extracted by mini-css-extract-plugin +var _1 = () => "class-name-a"; +var _2 = () => "class-name-b"; + + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log((0,_style_css__WEBPACK_IMPORTED_MODULE_0__.cnA)(), (0,_style_css__WEBPACK_IMPORTED_MODULE_0__.cnB)()); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/custom-loader-with-functional-exports/webpack.config.js b/test/cases/custom-loader-with-functional-exports/webpack.config.js new file mode 100644 index 00000000..f2f951eb --- /dev/null +++ b/test/cases/custom-loader-with-functional-exports/webpack.config.js @@ -0,0 +1,21 @@ +import path from "path"; + +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + context: path.resolve(__dirname, "app"), + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "./mockLoader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/custom-loader-with-new-url-and-public-path-1/app/img.png b/test/cases/custom-loader-with-new-url-and-public-path-1/app/img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path-1/app/img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path-1/app/index.js b/test/cases/custom-loader-with-new-url-and-public-path-1/app/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-1/app/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/custom-loader-with-new-url-and-public-path-1/app/mockLoader.js b/test/cases/custom-loader-with-new-url-and-public-path-1/app/mockLoader.js new file mode 100644 index 00000000..3131ef8d --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-1/app/mockLoader.js @@ -0,0 +1,12 @@ +export default function loader() { + const callback = this.async(); + + callback( + null, + `export default [ + [module.id, ".foo {background: url("https://github.com/+%20new%20URL(%22./img.png%22,%20import.meta.url) + ")}", ""], + [module.id, ".bar {background: url("https://github.com/+%20new%20URL(%22../outer-img.png%22,%20import.meta.url) + ")}", ""], + [module.id, ".baz {background: url("https://github.com/+%20new%20URL(%22./nested/nested-img.png%22,%20import.meta.url) + ")}", ""] + ]`, + ); +} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-1/app/nested/nested-img.png b/test/cases/custom-loader-with-new-url-and-public-path-1/app/nested/nested-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path-1/app/nested/nested-img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path-1/app/style.css b/test/cases/custom-loader-with-new-url-and-public-path-1/app/style.css new file mode 100644 index 00000000..f6cbd40f --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-1/app/style.css @@ -0,0 +1,3 @@ +.class { + background: red; +} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5-importModule/main.css b/test/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5-importModule/main.css new file mode 100644 index 00000000..943a7a59 --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5-importModule/main.css @@ -0,0 +1,3 @@ +.foo {background: url(https://github.com/public/img.png)} +.bar {background: url(https://github.com/outer-img.png)} +.baz {background: url(https://github.com/public/nested/nested-img.png)} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5/main.css b/test/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5/main.css new file mode 100644 index 00000000..292bfd37 --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-1/expected/webpack-5/main.css @@ -0,0 +1,3 @@ +.foo {background: url(https://github.com/public/img.png)} +.bar {background: url(https://github.com/outer-img.png)} +.baz {background: url(https://github.com/public/nested/nested-img.png)} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-1/outer-img.png b/test/cases/custom-loader-with-new-url-and-public-path-1/outer-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path-1/outer-img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path-1/webpack.config.js b/test/cases/custom-loader-with-new-url-and-public-path-1/webpack.config.js new file mode 100644 index 00000000..4eecda40 --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-1/webpack.config.js @@ -0,0 +1,36 @@ +import path from "path"; + +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + context: path.resolve(__dirname, "app"), + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "public/", + }, + }, + "./mockLoader", + ], + }, + { + test: /\.png$/, + type: "asset/resource", + generator: { + filename: "[path][name][ext]", + }, + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/custom-loader-with-new-url-and-public-path-auto/app/img.png b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path-auto/app/index.js b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/custom-loader-with-new-url-and-public-path-auto/app/mockLoader.js b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/mockLoader.js new file mode 100644 index 00000000..3131ef8d --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/mockLoader.js @@ -0,0 +1,12 @@ +export default function loader() { + const callback = this.async(); + + callback( + null, + `export default [ + [module.id, ".foo {background: url("https://github.com/+%20new%20URL(%22./img.png%22,%20import.meta.url) + ")}", ""], + [module.id, ".bar {background: url("https://github.com/+%20new%20URL(%22../outer-img.png%22,%20import.meta.url) + ")}", ""], + [module.id, ".baz {background: url("https://github.com/+%20new%20URL(%22./nested/nested-img.png%22,%20import.meta.url) + ")}", ""] + ]`, + ); +} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-auto/app/nested/nested-img.png b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/nested/nested-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/nested/nested-img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path-auto/app/style.css b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/style.css new file mode 100644 index 00000000..f6cbd40f --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-auto/app/style.css @@ -0,0 +1,3 @@ +.class { + background: red; +} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-auto/expected/main.css b/test/cases/custom-loader-with-new-url-and-public-path-auto/expected/main.css new file mode 100644 index 00000000..3d87a6ed --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-auto/expected/main.css @@ -0,0 +1,3 @@ +.foo {background: url(https://github.com/img.png)} +.bar {background: url(https://github.com/outer-img.png)} +.baz {background: url(https://github.com/nested/nested-img.png)} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-auto/outer-img.png b/test/cases/custom-loader-with-new-url-and-public-path-auto/outer-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path-auto/outer-img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path-auto/webpack.config.js b/test/cases/custom-loader-with-new-url-and-public-path-auto/webpack.config.js new file mode 100644 index 00000000..c4af6ef0 --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-auto/webpack.config.js @@ -0,0 +1,36 @@ +import path from "path"; + +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + context: path.resolve(__dirname, "app"), + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "auto", + }, + }, + "./mockLoader", + ], + }, + { + test: /\.png$/, + type: "asset/resource", + generator: { + filename: "[path][name][ext]", + }, + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/img.png b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/index.js b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/mockLoader.js b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/mockLoader.js new file mode 100644 index 00000000..3131ef8d --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/mockLoader.js @@ -0,0 +1,12 @@ +export default function loader() { + const callback = this.async(); + + callback( + null, + `export default [ + [module.id, ".foo {background: url("https://github.com/+%20new%20URL(%22./img.png%22,%20import.meta.url) + ")}", ""], + [module.id, ".bar {background: url("https://github.com/+%20new%20URL(%22../outer-img.png%22,%20import.meta.url) + ")}", ""], + [module.id, ".baz {background: url("https://github.com/+%20new%20URL(%22./nested/nested-img.png%22,%20import.meta.url) + ")}", ""] + ]`, + ); +} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/nested/nested-img.png b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/nested/nested-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/nested/nested-img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/style.css b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/style.css new file mode 100644 index 00000000..f6cbd40f --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/app/style.css @@ -0,0 +1,3 @@ +.class { + background: red; +} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-default-auto/expected/main.css b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/expected/main.css new file mode 100644 index 00000000..3d87a6ed --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/expected/main.css @@ -0,0 +1,3 @@ +.foo {background: url(https://github.com/img.png)} +.bar {background: url(https://github.com/outer-img.png)} +.baz {background: url(https://github.com/nested/nested-img.png)} diff --git a/test/cases/custom-loader-with-new-url-and-public-path-default-auto/outer-img.png b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/outer-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/outer-img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path-default-auto/webpack.config.js b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/webpack.config.js new file mode 100644 index 00000000..545562ea --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path-default-auto/webpack.config.js @@ -0,0 +1,28 @@ +import path from "path"; + +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + context: path.resolve(__dirname, "app"), + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "./mockLoader"], + }, + { + test: /\.png$/, + type: "asset/resource", + generator: { + filename: "[path][name][ext]", + }, + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/custom-loader-with-new-url-and-public-path/app/img.png b/test/cases/custom-loader-with-new-url-and-public-path/app/img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path/app/img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path/app/index.js b/test/cases/custom-loader-with-new-url-and-public-path/app/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path/app/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/custom-loader-with-new-url-and-public-path/app/mockLoader.js b/test/cases/custom-loader-with-new-url-and-public-path/app/mockLoader.js new file mode 100644 index 00000000..3131ef8d --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path/app/mockLoader.js @@ -0,0 +1,12 @@ +export default function loader() { + const callback = this.async(); + + callback( + null, + `export default [ + [module.id, ".foo {background: url("https://github.com/+%20new%20URL(%22./img.png%22,%20import.meta.url) + ")}", ""], + [module.id, ".bar {background: url("https://github.com/+%20new%20URL(%22../outer-img.png%22,%20import.meta.url) + ")}", ""], + [module.id, ".baz {background: url("https://github.com/+%20new%20URL(%22./nested/nested-img.png%22,%20import.meta.url) + ")}", ""] + ]`, + ); +} diff --git a/test/cases/custom-loader-with-new-url-and-public-path/app/nested/nested-img.png b/test/cases/custom-loader-with-new-url-and-public-path/app/nested/nested-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path/app/nested/nested-img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path/app/style.css b/test/cases/custom-loader-with-new-url-and-public-path/app/style.css new file mode 100644 index 00000000..f6cbd40f --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path/app/style.css @@ -0,0 +1,3 @@ +.class { + background: red; +} diff --git a/test/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5-importModule/main.css b/test/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5-importModule/main.css new file mode 100644 index 00000000..dfcd30bc --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5-importModule/main.css @@ -0,0 +1,3 @@ +.foo {background: url(https://github.com/public/img.png)} +.bar {background: url(https://github.com/outer-img.png)} +.baz {background: url(https://github.com/public/nested/nested-img.png)} diff --git a/test/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5/main.css b/test/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5/main.css new file mode 100644 index 00000000..9a883f4d --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path/expected/webpack-5/main.css @@ -0,0 +1,3 @@ +.foo {background: url(https://github.com/public/img.png)} +.bar {background: url(https://github.com/outer-img.png)} +.baz {background: url(https://github.com/public/nested/nested-img.png)} diff --git a/test/cases/custom-loader-with-new-url-and-public-path/outer-img.png b/test/cases/custom-loader-with-new-url-and-public-path/outer-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/custom-loader-with-new-url-and-public-path/outer-img.png differ diff --git a/test/cases/custom-loader-with-new-url-and-public-path/webpack.config.js b/test/cases/custom-loader-with-new-url-and-public-path/webpack.config.js new file mode 100644 index 00000000..a817fbf1 --- /dev/null +++ b/test/cases/custom-loader-with-new-url-and-public-path/webpack.config.js @@ -0,0 +1,36 @@ +import path from "path"; + +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + context: path.resolve(__dirname, "app"), + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "/public/", + }, + }, + "./mockLoader", + ], + }, + { + test: /\.png$/, + type: "asset/resource", + generator: { + filename: "[path][name][ext]", + }, + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/default-options/expected/main.css b/test/cases/default-options/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/default-options/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/default-options/index.js b/test/cases/default-options/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/default-options/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/default-options/style.css b/test/cases/default-options/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/default-options/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/default-options/webpack.config.js b/test/cases/default-options/webpack.config.js new file mode 100644 index 00000000..7d53ef2d --- /dev/null +++ b/test/cases/default-options/webpack.config.js @@ -0,0 +1,14 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [new Self()], +}; diff --git a/test/cases/dependOn-multiple-files-per-entry/entryA.js b/test/cases/dependOn-multiple-files-per-entry/entryA.js new file mode 100644 index 00000000..e5558621 --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/entryA.js @@ -0,0 +1 @@ +import "./styleA.css"; diff --git a/test/cases/dependOn-multiple-files-per-entry/entryB.js b/test/cases/dependOn-multiple-files-per-entry/entryB.js new file mode 100644 index 00000000..3a760688 --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/entryB.js @@ -0,0 +1 @@ +import "./styleB.css"; diff --git a/test/cases/dependOn-multiple-files-per-entry/entryC.js b/test/cases/dependOn-multiple-files-per-entry/entryC.js new file mode 100644 index 00000000..8fc7193e --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/entryC.js @@ -0,0 +1 @@ +import "./styleC.css"; diff --git a/test/cases/dependOn-multiple-files-per-entry/entryD.js b/test/cases/dependOn-multiple-files-per-entry/entryD.js new file mode 100644 index 00000000..f6c8f50d --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/entryD.js @@ -0,0 +1 @@ +import "./styleD.css"; diff --git a/test/cases/dependOn-multiple-files-per-entry/expected/common.css b/test/cases/dependOn-multiple-files-per-entry/expected/common.css new file mode 100644 index 00000000..7b8c3886 --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/expected/common.css @@ -0,0 +1,8 @@ +.styleC { + background: red; +} + +.styleD { + background: blue; +} + diff --git a/test/cases/dependOn-multiple-files-per-entry/expected/common.js b/test/cases/dependOn-multiple-files-per-entry/expected/common.js new file mode 100644 index 00000000..fdb48f88 --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/expected/common.js @@ -0,0 +1,174 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), +/* 2 */, +/* 3 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/chunk loaded */ +/******/ (() => { +/******/ var deferred = []; +/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ if(chunkIds) { +/******/ priority = priority || 0; +/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; +/******/ deferred[i] = [chunkIds, fn, priority]; +/******/ return; +/******/ } +/******/ var notFulfilled = Infinity; +/******/ for (var i = 0; i < deferred.length; i++) { +/******/ var [chunkIds, fn, priority] = deferred[i]; +/******/ var fulfilled = true; +/******/ for (var j = 0; j < chunkIds.length; j++) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { +/******/ chunkIds.splice(j--, 1); +/******/ } else { +/******/ fulfilled = false; +/******/ if(priority < notFulfilled) notFulfilled = priority; +/******/ } +/******/ } +/******/ if(fulfilled) { +/******/ deferred.splice(i--, 1) +/******/ var r = fn(); +/******/ if (r !== undefined) result = r; +/******/ } +/******/ } +/******/ return result; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ return __webpack_require__.O(result); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules. +(() => { +var __webpack_exports__ = {}; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _styleC_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +})(); + +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _styleD_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); + + +})(); + +__webpack_exports__ = __webpack_require__.O(__webpack_exports__); +/******/ })() +; \ No newline at end of file diff --git a/test/cases/dependOn-multiple-files-per-entry/expected/entry1.css b/test/cases/dependOn-multiple-files-per-entry/expected/entry1.css new file mode 100644 index 00000000..bd9b41d3 --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/expected/entry1.css @@ -0,0 +1,8 @@ +.styleB { + background: blue; +} + +.styleA { + background: red; +} + diff --git a/test/cases/dependOn-multiple-files-per-entry/expected/entry1.js b/test/cases/dependOn-multiple-files-per-entry/expected/entry1.js new file mode 100644 index 00000000..49a5626c --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/expected/entry1.js @@ -0,0 +1,46 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[1],[ +/* 0 */, +/* 1 */, +/* 2 */, +/* 3 */, +/* 4 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _styleB_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); + + + +/***/ }), +/* 5 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), +/* 6 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _styleA_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); + + + +/***/ }), +/* 7 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +], +/******/ __webpack_require__ => { // webpackRuntimeModules +/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) +/******/ var __webpack_exports__ = (__webpack_exec__(6), __webpack_exec__(4)); +/******/ } +]); \ No newline at end of file diff --git a/test/cases/dependOn-multiple-files-per-entry/styleA.css b/test/cases/dependOn-multiple-files-per-entry/styleA.css new file mode 100644 index 00000000..ab12e311 --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/styleA.css @@ -0,0 +1,3 @@ +.styleA { + background: red; +} diff --git a/test/cases/dependOn-multiple-files-per-entry/styleB.css b/test/cases/dependOn-multiple-files-per-entry/styleB.css new file mode 100644 index 00000000..857b0908 --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/styleB.css @@ -0,0 +1,3 @@ +.styleB { + background: blue; +} diff --git a/test/cases/dependOn-multiple-files-per-entry/styleC.css b/test/cases/dependOn-multiple-files-per-entry/styleC.css new file mode 100644 index 00000000..0cbc5c9e --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/styleC.css @@ -0,0 +1,3 @@ +.styleC { + background: red; +} diff --git a/test/cases/dependOn-multiple-files-per-entry/styleD.css b/test/cases/dependOn-multiple-files-per-entry/styleD.css new file mode 100644 index 00000000..61aedcc0 --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/styleD.css @@ -0,0 +1,3 @@ +.styleD { + background: blue; +} diff --git a/test/cases/dependOn-multiple-files-per-entry/webpack.config.js b/test/cases/dependOn-multiple-files-per-entry/webpack.config.js new file mode 100644 index 00000000..dcb98f72 --- /dev/null +++ b/test/cases/dependOn-multiple-files-per-entry/webpack.config.js @@ -0,0 +1,21 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + entry1: { import: ["./entryA.js", "./entryB.js"], dependOn: "common" }, + common: ["./entryC.js", "./entryD.js"], + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/dependOn/entryA.js b/test/cases/dependOn/entryA.js new file mode 100644 index 00000000..e5558621 --- /dev/null +++ b/test/cases/dependOn/entryA.js @@ -0,0 +1 @@ +import "./styleA.css"; diff --git a/test/cases/dependOn/entryB.js b/test/cases/dependOn/entryB.js new file mode 100644 index 00000000..3a760688 --- /dev/null +++ b/test/cases/dependOn/entryB.js @@ -0,0 +1 @@ +import "./styleB.css"; diff --git a/test/cases/dependOn/expected/common.css b/test/cases/dependOn/expected/common.css new file mode 100644 index 00000000..bbb56596 --- /dev/null +++ b/test/cases/dependOn/expected/common.css @@ -0,0 +1,4 @@ +.styleB { + background: blue; +} + diff --git a/test/cases/dependOn/expected/common.js b/test/cases/dependOn/expected/common.js new file mode 100644 index 00000000..1c896682 --- /dev/null +++ b/test/cases/dependOn/expected/common.js @@ -0,0 +1,156 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/chunk loaded */ +/******/ (() => { +/******/ var deferred = []; +/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ if(chunkIds) { +/******/ priority = priority || 0; +/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; +/******/ deferred[i] = [chunkIds, fn, priority]; +/******/ return; +/******/ } +/******/ var notFulfilled = Infinity; +/******/ for (var i = 0; i < deferred.length; i++) { +/******/ var [chunkIds, fn, priority] = deferred[i]; +/******/ var fulfilled = true; +/******/ for (var j = 0; j < chunkIds.length; j++) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { +/******/ chunkIds.splice(j--, 1); +/******/ } else { +/******/ fulfilled = false; +/******/ if(priority < notFulfilled) notFulfilled = priority; +/******/ } +/******/ } +/******/ if(fulfilled) { +/******/ deferred.splice(i--, 1) +/******/ var r = fn(); +/******/ if (r !== undefined) result = r; +/******/ } +/******/ } +/******/ return result; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ return __webpack_require__.O(result); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _styleB_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +})(); + +__webpack_exports__ = __webpack_require__.O(__webpack_exports__); +/******/ })() +; \ No newline at end of file diff --git a/test/cases/dependOn/expected/entry1.css b/test/cases/dependOn/expected/entry1.css new file mode 100644 index 00000000..95d70a8e --- /dev/null +++ b/test/cases/dependOn/expected/entry1.css @@ -0,0 +1,4 @@ +.styleA { + background: red; +} + diff --git a/test/cases/dependOn/expected/entry1.js b/test/cases/dependOn/expected/entry1.js new file mode 100644 index 00000000..119a9749 --- /dev/null +++ b/test/cases/dependOn/expected/entry1.js @@ -0,0 +1,27 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[1],[ +/* 0 */, +/* 1 */, +/* 2 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _styleA_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); + + + +/***/ }), +/* 3 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +], +/******/ __webpack_require__ => { // webpackRuntimeModules +/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) +/******/ var __webpack_exports__ = (__webpack_exec__(2)); +/******/ } +]); \ No newline at end of file diff --git a/test/cases/dependOn/styleA.css b/test/cases/dependOn/styleA.css new file mode 100644 index 00000000..ab12e311 --- /dev/null +++ b/test/cases/dependOn/styleA.css @@ -0,0 +1,3 @@ +.styleA { + background: red; +} diff --git a/test/cases/dependOn/styleB.css b/test/cases/dependOn/styleB.css new file mode 100644 index 00000000..857b0908 --- /dev/null +++ b/test/cases/dependOn/styleB.css @@ -0,0 +1,3 @@ +.styleB { + background: blue; +} diff --git a/test/cases/dependOn/webpack.config.js b/test/cases/dependOn/webpack.config.js new file mode 100644 index 00000000..f5d8b85e --- /dev/null +++ b/test/cases/dependOn/webpack.config.js @@ -0,0 +1,21 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + entry1: { import: "./entryA.js", dependOn: "common" }, + common: "./entryB.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/devtool-source-map-from-loaders/expected/main.css b/test/cases/devtool-source-map-from-loaders/expected/main.css new file mode 100644 index 00000000..8f8cf968 --- /dev/null +++ b/test/cases/devtool-source-map-from-loaders/expected/main.css @@ -0,0 +1,6 @@ +body { + background: red; +} + + +/*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/test/cases/devtool-source-map-from-loaders/expected/main.css.map b/test/cases/devtool-source-map-from-loaders/expected/main.css.map new file mode 100644 index 00000000..6aafc839 --- /dev/null +++ b/test/cases/devtool-source-map-from-loaders/expected/main.css.map @@ -0,0 +1 @@ +{"version":3,"file":"main.css","mappings":"AAAA;EACE,eAAe;AACjB","sources":["webpack:///./style.css"],"sourcesContent":["body {\n background: red;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/test/cases/devtool-source-map-from-loaders/index.js b/test/cases/devtool-source-map-from-loaders/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/devtool-source-map-from-loaders/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/devtool-source-map-from-loaders/style.css b/test/cases/devtool-source-map-from-loaders/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/devtool-source-map-from-loaders/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/devtool-source-map-from-loaders/webpack.config.js b/test/cases/devtool-source-map-from-loaders/webpack.config.js new file mode 100644 index 00000000..b3a1eca7 --- /dev/null +++ b/test/cases/devtool-source-map-from-loaders/webpack.config.js @@ -0,0 +1,27 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + devtool: "source-map", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + options: { + sourceMap: true, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/devtool-source-map-no-source-maps-from-loaders/expected/main.css b/test/cases/devtool-source-map-no-source-maps-from-loaders/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/devtool-source-map-no-source-maps-from-loaders/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/devtool-source-map-no-source-maps-from-loaders/index.js b/test/cases/devtool-source-map-no-source-maps-from-loaders/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/devtool-source-map-no-source-maps-from-loaders/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/devtool-source-map-no-source-maps-from-loaders/style.css b/test/cases/devtool-source-map-no-source-maps-from-loaders/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/devtool-source-map-no-source-maps-from-loaders/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/devtool-source-map-no-source-maps-from-loaders/webpack.config.js b/test/cases/devtool-source-map-no-source-maps-from-loaders/webpack.config.js new file mode 100644 index 00000000..c874de2c --- /dev/null +++ b/test/cases/devtool-source-map-no-source-maps-from-loaders/webpack.config.js @@ -0,0 +1,27 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + devtool: "source-map", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + options: { + sourceMap: false, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/devtool-source-map/expected/main.css b/test/cases/devtool-source-map/expected/main.css new file mode 100644 index 00000000..8f8cf968 --- /dev/null +++ b/test/cases/devtool-source-map/expected/main.css @@ -0,0 +1,6 @@ +body { + background: red; +} + + +/*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/test/cases/devtool-source-map/expected/main.css.map b/test/cases/devtool-source-map/expected/main.css.map new file mode 100644 index 00000000..6aafc839 --- /dev/null +++ b/test/cases/devtool-source-map/expected/main.css.map @@ -0,0 +1 @@ +{"version":3,"file":"main.css","mappings":"AAAA;EACE,eAAe;AACjB","sources":["webpack:///./style.css"],"sourcesContent":["body {\n background: red;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/test/cases/devtool-source-map/index.js b/test/cases/devtool-source-map/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/devtool-source-map/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/devtool-source-map/style.css b/test/cases/devtool-source-map/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/devtool-source-map/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/devtool-source-map/webpack.config.js b/test/cases/devtool-source-map/webpack.config.js new file mode 100644 index 00000000..4e07e687 --- /dev/null +++ b/test/cases/devtool-source-map/webpack.config.js @@ -0,0 +1,19 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + devtool: "source-map", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/es-module-concatenation-modules/a.css b/test/cases/es-module-concatenation-modules/a.css new file mode 100644 index 00000000..9cad053c --- /dev/null +++ b/test/cases/es-module-concatenation-modules/a.css @@ -0,0 +1,3 @@ +.a { + background: red; +} diff --git a/test/cases/es-module-concatenation-modules/b.css b/test/cases/es-module-concatenation-modules/b.css new file mode 100644 index 00000000..295b4a8f --- /dev/null +++ b/test/cases/es-module-concatenation-modules/b.css @@ -0,0 +1,3 @@ +.b { + background: green; +} diff --git a/test/cases/es-module-concatenation-modules/c.css b/test/cases/es-module-concatenation-modules/c.css new file mode 100644 index 00000000..cbdd76cc --- /dev/null +++ b/test/cases/es-module-concatenation-modules/c.css @@ -0,0 +1,3 @@ +.c { + background: blue; +} diff --git a/test/cases/es-module-concatenation-modules/expected/main.css b/test/cases/es-module-concatenation-modules/expected/main.css new file mode 100644 index 00000000..414d12e5 --- /dev/null +++ b/test/cases/es-module-concatenation-modules/expected/main.css @@ -0,0 +1,12 @@ +.foo__a { + background: red; +} + +.foo__b { + background: green; +} + +.foo__c { + background: blue; +} + diff --git a/test/cases/es-module-concatenation-modules/expected/main.js b/test/cases/es-module-concatenation-modules/expected/main.js new file mode 100644 index 00000000..80f5ab0b --- /dev/null +++ b/test/cases/es-module-concatenation-modules/expected/main.js @@ -0,0 +1,99 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ // The require scope +/******/ var __webpack_require__ = {}; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + a: () => (/* reexport */ a_namespaceObject), + b: () => (/* reexport */ b_namespaceObject), + c: () => (/* reexport */ c_1) +}); + +// NAMESPACE OBJECT: ./a.css +var a_namespaceObject = {}; +__webpack_require__.r(a_namespaceObject); +__webpack_require__.d(a_namespaceObject, { + a: () => (_1) +}); + +// NAMESPACE OBJECT: ./b.css +var b_namespaceObject = {}; +__webpack_require__.r(b_namespaceObject); +__webpack_require__.d(b_namespaceObject, { + b: () => (b_1) +}); + +// NAMESPACE OBJECT: ./index.js +var index_namespaceObject = {}; +__webpack_require__.r(index_namespaceObject); +__webpack_require__.d(index_namespaceObject, { + a: () => (a_namespaceObject), + b: () => (b_namespaceObject), + c: () => (c_1) +}); + +;// ./a.css +// extracted by mini-css-extract-plugin +var _1 = "foo__a"; + + +;// ./b.css +// extracted by mini-css-extract-plugin +var b_1 = "foo__b"; + + +;// ./c.css +// extracted by mini-css-extract-plugin +var c_1 = "foo__c"; + + +;// ./index.js +/* eslint-disable import/no-namespace */ + + + + + + + + +// eslint-disable-next-line no-console +console.log(index_namespaceObject); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/es-module-concatenation-modules/index.js b/test/cases/es-module-concatenation-modules/index.js new file mode 100644 index 00000000..42710aa3 --- /dev/null +++ b/test/cases/es-module-concatenation-modules/index.js @@ -0,0 +1,11 @@ +/* eslint-disable import/no-namespace */ +import * as a from "./a.css"; +import * as b from "./b.css"; + +import * as all from "./index"; + +export * from "./c.css"; +export { a, b }; + +// eslint-disable-next-line no-console +console.log(all); diff --git a/test/cases/es-module-concatenation-modules/webpack.config.js b/test/cases/es-module-concatenation-modules/webpack.config.js new file mode 100644 index 00000000..2e113d33 --- /dev/null +++ b/test/cases/es-module-concatenation-modules/webpack.config.js @@ -0,0 +1,38 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + optimization: { + concatenateModules: true, + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + esModule: true, + }, + }, + { + loader: "css-loader", + options: { + esModule: true, + modules: { + namedExport: true, + localIdentName: "foo__[local]", + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/es-module-concatenation/a.css b/test/cases/es-module-concatenation/a.css new file mode 100644 index 00000000..9cad053c --- /dev/null +++ b/test/cases/es-module-concatenation/a.css @@ -0,0 +1,3 @@ +.a { + background: red; +} diff --git a/test/cases/es-module-concatenation/b.css b/test/cases/es-module-concatenation/b.css new file mode 100644 index 00000000..295b4a8f --- /dev/null +++ b/test/cases/es-module-concatenation/b.css @@ -0,0 +1,3 @@ +.b { + background: green; +} diff --git a/test/cases/es-module-concatenation/c.css b/test/cases/es-module-concatenation/c.css new file mode 100644 index 00000000..cbdd76cc --- /dev/null +++ b/test/cases/es-module-concatenation/c.css @@ -0,0 +1,3 @@ +.c { + background: blue; +} diff --git a/test/cases/es-module-concatenation/expected/main.css b/test/cases/es-module-concatenation/expected/main.css new file mode 100644 index 00000000..a5728976 --- /dev/null +++ b/test/cases/es-module-concatenation/expected/main.css @@ -0,0 +1,12 @@ +.a { + background: red; +} + +.b { + background: green; +} + +.c { + background: blue; +} + diff --git a/test/cases/es-module-concatenation/expected/main.js b/test/cases/es-module-concatenation/expected/main.js new file mode 100644 index 00000000..06958ee2 --- /dev/null +++ b/test/cases/es-module-concatenation/expected/main.js @@ -0,0 +1,19 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; + +;// ./a.css +// extracted by mini-css-extract-plugin + +;// ./b.css +// extracted by mini-css-extract-plugin + +;// ./c.css +// extracted by mini-css-extract-plugin + +;// ./index.js + + + + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/es-module-concatenation/index.js b/test/cases/es-module-concatenation/index.js new file mode 100644 index 00000000..84ce35d2 --- /dev/null +++ b/test/cases/es-module-concatenation/index.js @@ -0,0 +1,3 @@ +import "./a.css"; +import "./b.css"; +import "./c.css"; diff --git a/test/cases/es-module-concatenation/webpack.config.js b/test/cases/es-module-concatenation/webpack.config.js new file mode 100644 index 00000000..c54e4624 --- /dev/null +++ b/test/cases/es-module-concatenation/webpack.config.js @@ -0,0 +1,29 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + optimization: { + concatenateModules: true, + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + esModule: true, + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/es-module-syntax/expected/main.css b/test/cases/es-module-syntax/expected/main.css new file mode 100644 index 00000000..a296d763 --- /dev/null +++ b/test/cases/es-module-syntax/expected/main.css @@ -0,0 +1,12 @@ +.foo__style__a { + background: red; +} + +.foo__style__b { + color: green; +} + +.c { + color: blue; +} + diff --git a/test/cases/es-module-syntax/index.js b/test/cases/es-module-syntax/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/es-module-syntax/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/es-module-syntax/style.css b/test/cases/es-module-syntax/style.css new file mode 100644 index 00000000..ca57f5fe --- /dev/null +++ b/test/cases/es-module-syntax/style.css @@ -0,0 +1,11 @@ +.a { + background: red; +} + +:local(.b) { + color: green; +} + +:global(.c) { + color: blue; +} diff --git a/test/cases/es-module-syntax/webpack.config.js b/test/cases/es-module-syntax/webpack.config.js new file mode 100644 index 00000000..db2af7e8 --- /dev/null +++ b/test/cases/es-module-syntax/webpack.config.js @@ -0,0 +1,32 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { esModule: true }, + }, + { + loader: "css-loader", + options: { + modules: { + mode: "local", + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/es-named-and-default-export-1/empty.css b/test/cases/es-named-and-default-export-1/empty.css new file mode 100644 index 00000000..e69de29b diff --git a/test/cases/es-named-and-default-export-1/expected/main.css b/test/cases/es-named-and-default-export-1/expected/main.css new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/test/cases/es-named-and-default-export-1/expected/main.css @@ -0,0 +1 @@ + diff --git a/test/cases/es-named-and-default-export-1/expected/main.js b/test/cases/es-named-and-default-export-1/expected/main.js new file mode 100644 index 00000000..22d01e87 --- /dev/null +++ b/test/cases/es-named-and-default-export-1/expected/main.js @@ -0,0 +1,85 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +// extracted by mini-css-extract-plugin +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({}); + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _empty_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log({ css: _empty_css__WEBPACK_IMPORTED_MODULE_0__["default"] }); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/es-named-and-default-export-1/index.js b/test/cases/es-named-and-default-export-1/index.js new file mode 100644 index 00000000..e42dfb9a --- /dev/null +++ b/test/cases/es-named-and-default-export-1/index.js @@ -0,0 +1,4 @@ +import css from "./empty.css"; + +// eslint-disable-next-line no-console +console.log({ css }); diff --git a/test/cases/es-named-and-default-export-1/webpack.config.js b/test/cases/es-named-and-default-export-1/webpack.config.js new file mode 100644 index 00000000..b58d12f5 --- /dev/null +++ b/test/cases/es-named-and-default-export-1/webpack.config.js @@ -0,0 +1,34 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + defaultExport: true, + }, + }, + { + loader: "css-loader", + options: { + esModule: true, + modules: { + namedExport: true, + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/es-named-and-default-export/expected/main.css b/test/cases/es-named-and-default-export/expected/main.css new file mode 100644 index 00000000..aa9b1569 --- /dev/null +++ b/test/cases/es-named-and-default-export/expected/main.css @@ -0,0 +1,12 @@ +.foo__style__a-class { + background: red; +} + +.foo__style__b__class { + color: green; +} + +.foo__style__cClass { + color: blue; +} + diff --git a/test/cases/es-named-and-default-export/expected/main.js b/test/cases/es-named-and-default-export/expected/main.js new file mode 100644 index 00000000..74d2978f --- /dev/null +++ b/test/cases/es-named-and-default-export/expected/main.js @@ -0,0 +1,93 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "a-class": () => (/* binding */ _1), +/* harmony export */ b__class: () => (/* binding */ _2), +/* harmony export */ cClass: () => (/* binding */ _3), +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +// extracted by mini-css-extract-plugin +var _1 = "foo__style__a-class"; +var _2 = "foo__style__b__class"; +var _3 = "foo__style__cClass"; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ "a-class": _1, "b__class": _2, "cClass": _3 }); + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log({ css: _style_css__WEBPACK_IMPORTED_MODULE_0__["default"], aClass: _style_css__WEBPACK_IMPORTED_MODULE_0__["a-class"], bClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.b__class, cClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.cClass }); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/es-named-and-default-export/index.js b/test/cases/es-named-and-default-export/index.js new file mode 100644 index 00000000..aa114287 --- /dev/null +++ b/test/cases/es-named-and-default-export/index.js @@ -0,0 +1,8 @@ +import css, { + "a-class" as aClass, + "b__class" as bClass, + cClass, +} from "./style.css"; + +// eslint-disable-next-line no-console +console.log({ css, aClass, bClass, cClass }); diff --git a/test/cases/es-named-and-default-export/style.css b/test/cases/es-named-and-default-export/style.css new file mode 100644 index 00000000..a9085408 --- /dev/null +++ b/test/cases/es-named-and-default-export/style.css @@ -0,0 +1,11 @@ +.a-class { + background: red; +} + +.b__class { + color: green; +} + +.cClass { + color: blue; +} diff --git a/test/cases/es-named-and-default-export/webpack.config.js b/test/cases/es-named-and-default-export/webpack.config.js new file mode 100644 index 00000000..d7d364b3 --- /dev/null +++ b/test/cases/es-named-and-default-export/webpack.config.js @@ -0,0 +1,36 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + defaultExport: true, + }, + }, + { + loader: "css-loader", + options: { + esModule: true, + modules: { + namedExport: true, + exportLocalsConvention: "asIs", + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/es-named-export-as-is-output-module/expected/main.css b/test/cases/es-named-export-as-is-output-module/expected/main.css new file mode 100644 index 00000000..b9a7e294 --- /dev/null +++ b/test/cases/es-named-export-as-is-output-module/expected/main.css @@ -0,0 +1,12 @@ +.Xh041yLR4iCP4RGjge50 { + background: red; +} + +.NMuRsxoDwvW8BhSXhFAY { + color: green; +} + +.ayWIv09rPsAqE2JznIsI { + color: blue; +} + diff --git a/test/cases/es-named-export-as-is-output-module/expected/main.mjs b/test/cases/es-named-export-as-is-output-module/expected/main.mjs new file mode 100644 index 00000000..d7c38a98 --- /dev/null +++ b/test/cases/es-named-export-as-is-output-module/expected/main.mjs @@ -0,0 +1,87 @@ +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "a-class": () => (/* binding */ _1), +/* harmony export */ b__class: () => (/* binding */ _2), +/* harmony export */ cClass: () => (/* binding */ _3) +/* harmony export */ }); +// extracted by mini-css-extract-plugin +var _1 = "Xh041yLR4iCP4RGjge50"; +var _2 = "NMuRsxoDwvW8BhSXhFAY"; +var _3 = "ayWIv09rPsAqE2JznIsI"; + + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log({ css: _style_css__WEBPACK_IMPORTED_MODULE_0__["default"], aClass: _style_css__WEBPACK_IMPORTED_MODULE_0__["a-class"], bClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.b__class, cClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.cClass }); + +})(); + diff --git a/test/cases/es-named-export-as-is-output-module/index.js b/test/cases/es-named-export-as-is-output-module/index.js new file mode 100644 index 00000000..aa114287 --- /dev/null +++ b/test/cases/es-named-export-as-is-output-module/index.js @@ -0,0 +1,8 @@ +import css, { + "a-class" as aClass, + "b__class" as bClass, + cClass, +} from "./style.css"; + +// eslint-disable-next-line no-console +console.log({ css, aClass, bClass, cClass }); diff --git a/test/cases/es-named-export-as-is-output-module/style.css b/test/cases/es-named-export-as-is-output-module/style.css new file mode 100644 index 00000000..a9085408 --- /dev/null +++ b/test/cases/es-named-export-as-is-output-module/style.css @@ -0,0 +1,11 @@ +.a-class { + background: red; +} + +.b__class { + color: green; +} + +.cClass { + color: blue; +} diff --git a/test/cases/es-named-export-as-is-output-module/webpack.config.js b/test/cases/es-named-export-as-is-output-module/webpack.config.js new file mode 100644 index 00000000..2f78afe7 --- /dev/null +++ b/test/cases/es-named-export-as-is-output-module/webpack.config.js @@ -0,0 +1,38 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + esModule: true, + modules: { + namedExport: true, + exportLocalsConvention: "asIs", + }, + }, + }, + ], + }, + ], + }, + output: { + module: true, + }, + experiments: { + outputModule: true, + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/es-named-export-as-is/expected/main.css b/test/cases/es-named-export-as-is/expected/main.css new file mode 100644 index 00000000..b9a7e294 --- /dev/null +++ b/test/cases/es-named-export-as-is/expected/main.css @@ -0,0 +1,12 @@ +.Xh041yLR4iCP4RGjge50 { + background: red; +} + +.NMuRsxoDwvW8BhSXhFAY { + color: green; +} + +.ayWIv09rPsAqE2JznIsI { + color: blue; +} + diff --git a/test/cases/es-named-export-as-is/expected/main.js b/test/cases/es-named-export-as-is/expected/main.js new file mode 100644 index 00000000..5ee821da --- /dev/null +++ b/test/cases/es-named-export-as-is/expected/main.js @@ -0,0 +1,91 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "a-class": () => (/* binding */ _1), +/* harmony export */ b__class: () => (/* binding */ _2), +/* harmony export */ cClass: () => (/* binding */ _3) +/* harmony export */ }); +// extracted by mini-css-extract-plugin +var _1 = "Xh041yLR4iCP4RGjge50"; +var _2 = "NMuRsxoDwvW8BhSXhFAY"; +var _3 = "ayWIv09rPsAqE2JznIsI"; + + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log({ css: _style_css__WEBPACK_IMPORTED_MODULE_0__["default"], aClass: _style_css__WEBPACK_IMPORTED_MODULE_0__["a-class"], bClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.b__class, cClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.cClass }); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/es-named-export-as-is/index.js b/test/cases/es-named-export-as-is/index.js new file mode 100644 index 00000000..aa114287 --- /dev/null +++ b/test/cases/es-named-export-as-is/index.js @@ -0,0 +1,8 @@ +import css, { + "a-class" as aClass, + "b__class" as bClass, + cClass, +} from "./style.css"; + +// eslint-disable-next-line no-console +console.log({ css, aClass, bClass, cClass }); diff --git a/test/cases/es-named-export-as-is/style.css b/test/cases/es-named-export-as-is/style.css new file mode 100644 index 00000000..a9085408 --- /dev/null +++ b/test/cases/es-named-export-as-is/style.css @@ -0,0 +1,11 @@ +.a-class { + background: red; +} + +.b__class { + color: green; +} + +.cClass { + color: blue; +} diff --git a/test/cases/es-named-export-as-is/webpack.config.js b/test/cases/es-named-export-as-is/webpack.config.js new file mode 100644 index 00000000..e7a1091f --- /dev/null +++ b/test/cases/es-named-export-as-is/webpack.config.js @@ -0,0 +1,32 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + esModule: true, + modules: { + namedExport: true, + exportLocalsConvention: "asIs", + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/es-named-export-output-module/expected/main.css b/test/cases/es-named-export-output-module/expected/main.css new file mode 100644 index 00000000..aa9b1569 --- /dev/null +++ b/test/cases/es-named-export-output-module/expected/main.css @@ -0,0 +1,12 @@ +.foo__style__a-class { + background: red; +} + +.foo__style__b__class { + color: green; +} + +.foo__style__cClass { + color: blue; +} + diff --git a/test/cases/es-named-export-output-module/expected/main.mjs b/test/cases/es-named-export-output-module/expected/main.mjs new file mode 100644 index 00000000..b76e9911 --- /dev/null +++ b/test/cases/es-named-export-output-module/expected/main.mjs @@ -0,0 +1,87 @@ +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ aClass: () => (/* binding */ _1), +/* harmony export */ bClass: () => (/* binding */ _2), +/* harmony export */ cClass: () => (/* binding */ _3) +/* harmony export */ }); +// extracted by mini-css-extract-plugin +var _1 = "foo__style__a-class"; +var _2 = "foo__style__b__class"; +var _3 = "foo__style__cClass"; + + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log({ css: _style_css__WEBPACK_IMPORTED_MODULE_0__["default"], aClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.aClass, bClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.bClass, cClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.cClass }); + +})(); + diff --git a/test/cases/es-named-export-output-module/index.js b/test/cases/es-named-export-output-module/index.js new file mode 100644 index 00000000..ccbeff4d --- /dev/null +++ b/test/cases/es-named-export-output-module/index.js @@ -0,0 +1,4 @@ +import css, { aClass, bClass, cClass } from "./style.css"; + +// eslint-disable-next-line no-console +console.log({ css, aClass, bClass, cClass }); diff --git a/test/cases/es-named-export-output-module/style.css b/test/cases/es-named-export-output-module/style.css new file mode 100644 index 00000000..a9085408 --- /dev/null +++ b/test/cases/es-named-export-output-module/style.css @@ -0,0 +1,11 @@ +.a-class { + background: red; +} + +.b__class { + color: green; +} + +.cClass { + color: blue; +} diff --git a/test/cases/es-named-export-output-module/webpack.config.js b/test/cases/es-named-export-output-module/webpack.config.js new file mode 100644 index 00000000..c4831a52 --- /dev/null +++ b/test/cases/es-named-export-output-module/webpack.config.js @@ -0,0 +1,38 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + esModule: true, + modules: { + namedExport: true, + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, + output: { + module: true, + }, + experiments: { + outputModule: true, + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/es-named-export/expected/main.css b/test/cases/es-named-export/expected/main.css new file mode 100644 index 00000000..aa9b1569 --- /dev/null +++ b/test/cases/es-named-export/expected/main.css @@ -0,0 +1,12 @@ +.foo__style__a-class { + background: red; +} + +.foo__style__b__class { + color: green; +} + +.foo__style__cClass { + color: blue; +} + diff --git a/test/cases/es-named-export/expected/main.js b/test/cases/es-named-export/expected/main.js new file mode 100644 index 00000000..6c75ed05 --- /dev/null +++ b/test/cases/es-named-export/expected/main.js @@ -0,0 +1,91 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "a-class": () => (/* binding */ _1), +/* harmony export */ b__class: () => (/* binding */ _2), +/* harmony export */ cClass: () => (/* binding */ _3) +/* harmony export */ }); +// extracted by mini-css-extract-plugin +var _1 = "foo__style__a-class"; +var _2 = "foo__style__b__class"; +var _3 = "foo__style__cClass"; + + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log({ css: _style_css__WEBPACK_IMPORTED_MODULE_0__["default"], aClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.aClass, bClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.bClass, cClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.cClass }); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/es-named-export/index.js b/test/cases/es-named-export/index.js new file mode 100644 index 00000000..ccbeff4d --- /dev/null +++ b/test/cases/es-named-export/index.js @@ -0,0 +1,4 @@ +import css, { aClass, bClass, cClass } from "./style.css"; + +// eslint-disable-next-line no-console +console.log({ css, aClass, bClass, cClass }); diff --git a/test/cases/es-named-export/style.css b/test/cases/es-named-export/style.css new file mode 100644 index 00000000..a9085408 --- /dev/null +++ b/test/cases/es-named-export/style.css @@ -0,0 +1,11 @@ +.a-class { + background: red; +} + +.b__class { + color: green; +} + +.cClass { + color: blue; +} diff --git a/test/cases/es-named-export/webpack.config.js b/test/cases/es-named-export/webpack.config.js new file mode 100644 index 00000000..49f0c3c6 --- /dev/null +++ b/test/cases/es-named-export/webpack.config.js @@ -0,0 +1,33 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + esModule: true, + modules: { + namedExport: true, + exportLocalsConvention: "asIs", + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/experimentalUseImportModule-false/expected/main.css b/test/cases/experimentalUseImportModule-false/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/experimentalUseImportModule-false/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/experimentalUseImportModule-false/index.js b/test/cases/experimentalUseImportModule-false/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/experimentalUseImportModule-false/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/experimentalUseImportModule-false/style.css b/test/cases/experimentalUseImportModule-false/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/experimentalUseImportModule-false/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/experimentalUseImportModule-false/webpack.config.js b/test/cases/experimentalUseImportModule-false/webpack.config.js new file mode 100644 index 00000000..6f8875bb --- /dev/null +++ b/test/cases/experimentalUseImportModule-false/webpack.config.js @@ -0,0 +1,19 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + experimentalUseImportModule: false, + }), + ], +}; diff --git a/test/cases/experimentalUseImportModule-true/expected/main.css b/test/cases/experimentalUseImportModule-true/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/experimentalUseImportModule-true/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/experimentalUseImportModule-true/index.js b/test/cases/experimentalUseImportModule-true/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/experimentalUseImportModule-true/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/experimentalUseImportModule-true/style.css b/test/cases/experimentalUseImportModule-true/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/experimentalUseImportModule-true/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/experimentalUseImportModule-true/webpack.config.js b/test/cases/experimentalUseImportModule-true/webpack.config.js new file mode 100644 index 00000000..db11f1a6 --- /dev/null +++ b/test/cases/experimentalUseImportModule-true/webpack.config.js @@ -0,0 +1,19 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + experimentalUseImportModule: true, + }), + ], +}; diff --git a/test/cases/experimentalUseImportModule-undefined/expected/main.css b/test/cases/experimentalUseImportModule-undefined/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/experimentalUseImportModule-undefined/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/experimentalUseImportModule-undefined/index.js b/test/cases/experimentalUseImportModule-undefined/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/experimentalUseImportModule-undefined/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/experimentalUseImportModule-undefined/style.css b/test/cases/experimentalUseImportModule-undefined/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/experimentalUseImportModule-undefined/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/experimentalUseImportModule-undefined/webpack.config.js b/test/cases/experimentalUseImportModule-undefined/webpack.config.js new file mode 100644 index 00000000..23a87d57 --- /dev/null +++ b/test/cases/experimentalUseImportModule-undefined/webpack.config.js @@ -0,0 +1,20 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + // eslint-disable-next-line no-undefined + experimentalUseImportModule: undefined, + }), + ], +}; diff --git a/test/cases/export-only-locals-and-es-named-export/expected/main.js b/test/cases/export-only-locals-and-es-named-export/expected/main.js new file mode 100644 index 00000000..b91afc77 --- /dev/null +++ b/test/cases/export-only-locals-and-es-named-export/expected/main.js @@ -0,0 +1,91 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ aClass: () => (/* binding */ _1), +/* harmony export */ bClass: () => (/* binding */ _2), +/* harmony export */ cClass: () => (/* binding */ _3) +/* harmony export */ }); +// extracted by mini-css-extract-plugin +var _1 = "foo__style__a-class"; +var _2 = "foo__style__b__class"; +var _3 = "foo__style__cClass"; + + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log({ aClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.aClass, bClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.bClass, cClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.cClass }); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/export-only-locals-and-es-named-export/index.js b/test/cases/export-only-locals-and-es-named-export/index.js new file mode 100644 index 00000000..60873693 --- /dev/null +++ b/test/cases/export-only-locals-and-es-named-export/index.js @@ -0,0 +1,4 @@ +import { aClass, bClass, cClass } from "./style.css"; + +// eslint-disable-next-line no-console +console.log({ aClass, bClass, cClass }); diff --git a/test/cases/export-only-locals-and-es-named-export/style.css b/test/cases/export-only-locals-and-es-named-export/style.css new file mode 100644 index 00000000..a9085408 --- /dev/null +++ b/test/cases/export-only-locals-and-es-named-export/style.css @@ -0,0 +1,11 @@ +.a-class { + background: red; +} + +.b__class { + color: green; +} + +.cClass { + color: blue; +} diff --git a/test/cases/export-only-locals-and-es-named-export/webpack.config.js b/test/cases/export-only-locals-and-es-named-export/webpack.config.js new file mode 100644 index 00000000..2cbb9676 --- /dev/null +++ b/test/cases/export-only-locals-and-es-named-export/webpack.config.js @@ -0,0 +1,32 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + modules: { + namedExport: true, + localIdentName: "foo__[name]__[local]", + exportOnlyLocals: true, + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/export-only-locals-commonjs/expected/main.js b/test/cases/export-only-locals-commonjs/expected/main.js new file mode 100644 index 00000000..16322ad9 --- /dev/null +++ b/test/cases/export-only-locals-commonjs/expected/main.js @@ -0,0 +1,65 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log({ aClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.aClass, bClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.bClass, cClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.cClass }); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/export-only-locals-commonjs/index.js b/test/cases/export-only-locals-commonjs/index.js new file mode 100644 index 00000000..60873693 --- /dev/null +++ b/test/cases/export-only-locals-commonjs/index.js @@ -0,0 +1,4 @@ +import { aClass, bClass, cClass } from "./style.css"; + +// eslint-disable-next-line no-console +console.log({ aClass, bClass, cClass }); diff --git a/test/cases/export-only-locals-commonjs/style.css b/test/cases/export-only-locals-commonjs/style.css new file mode 100644 index 00000000..a9085408 --- /dev/null +++ b/test/cases/export-only-locals-commonjs/style.css @@ -0,0 +1,11 @@ +.a-class { + background: red; +} + +.b__class { + color: green; +} + +.cClass { + color: blue; +} diff --git a/test/cases/export-only-locals-commonjs/webpack.config.js b/test/cases/export-only-locals-commonjs/webpack.config.js new file mode 100644 index 00000000..74b9b8e3 --- /dev/null +++ b/test/cases/export-only-locals-commonjs/webpack.config.js @@ -0,0 +1,32 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + esModule: false, + modules: { + localIdentName: "foo__[name]__[local]", + exportOnlyLocals: true, + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/export-only-locals/expected/main.js b/test/cases/export-only-locals/expected/main.js new file mode 100644 index 00000000..16322ad9 --- /dev/null +++ b/test/cases/export-only-locals/expected/main.js @@ -0,0 +1,65 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +// eslint-disable-next-line no-console +console.log({ aClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.aClass, bClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.bClass, cClass: _style_css__WEBPACK_IMPORTED_MODULE_0__.cClass }); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/export-only-locals/index.js b/test/cases/export-only-locals/index.js new file mode 100644 index 00000000..60873693 --- /dev/null +++ b/test/cases/export-only-locals/index.js @@ -0,0 +1,4 @@ +import { aClass, bClass, cClass } from "./style.css"; + +// eslint-disable-next-line no-console +console.log({ aClass, bClass, cClass }); diff --git a/test/cases/export-only-locals/style.css b/test/cases/export-only-locals/style.css new file mode 100644 index 00000000..a9085408 --- /dev/null +++ b/test/cases/export-only-locals/style.css @@ -0,0 +1,11 @@ +.a-class { + background: red; +} + +.b__class { + color: green; +} + +.cClass { + color: blue; +} diff --git a/test/cases/export-only-locals/webpack.config.js b/test/cases/export-only-locals/webpack.config.js new file mode 100644 index 00000000..0a8dcf63 --- /dev/null +++ b/test/cases/export-only-locals/webpack.config.js @@ -0,0 +1,31 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + modules: { + localIdentName: "foo__[name]__[local]", + exportOnlyLocals: true, + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/file-loader/expected/main.css b/test/cases/file-loader/expected/main.css new file mode 100644 index 00000000..0f3fa1e5 --- /dev/null +++ b/test/cases/file-loader/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/static/react.svg); +} + diff --git a/test/cases/file-loader/index.js b/test/cases/file-loader/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/file-loader/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/file-loader/react.svg b/test/cases/file-loader/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/file-loader/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/file-loader/style.css b/test/cases/file-loader/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/file-loader/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/file-loader/webpack.config.js b/test/cases/file-loader/webpack.config.js new file mode 100644 index 00000000..103c461e --- /dev/null +++ b/test/cases/file-loader/webpack.config.js @@ -0,0 +1,40 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + esModule: false, + }, + }, + ], + }, + { + test: /\.svg$/, + type: "javascript/auto", + use: [ + { + loader: "file-loader", + options: { + name: "static/[name].[ext]", + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/filename-as-function/expected/demo/css/main.css b/test/cases/filename-as-function/expected/demo/css/main.css new file mode 100644 index 00000000..5fa68584 --- /dev/null +++ b/test/cases/filename-as-function/expected/demo/css/main.css @@ -0,0 +1,4 @@ +body { + background: purple; +} + diff --git a/test/cases/filename-as-function/index.js b/test/cases/filename-as-function/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/filename-as-function/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/filename-as-function/style.css b/test/cases/filename-as-function/style.css new file mode 100644 index 00000000..8e37f694 --- /dev/null +++ b/test/cases/filename-as-function/style.css @@ -0,0 +1,3 @@ +body { + background: purple; +} diff --git a/test/cases/filename-as-function/webpack.config.js b/test/cases/filename-as-function/webpack.config.js new file mode 100644 index 00000000..8e37fd85 --- /dev/null +++ b/test/cases/filename-as-function/webpack.config.js @@ -0,0 +1,23 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + "demo/js/main": "./index.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + output: { + filename: "[name].js", + }, + plugins: [ + new Self({ + filename: ({ chunk }) => `${chunk.name.replace("/js/", "/css/")}.css`, + }), + ], +}; diff --git a/test/cases/filename-with-template/async.css b/test/cases/filename-with-template/async.css new file mode 100644 index 00000000..b1645094 --- /dev/null +++ b/test/cases/filename-with-template/async.css @@ -0,0 +1,3 @@ +.async { + color: red; +} diff --git a/test/cases/filename-with-template/expected/async.css b/test/cases/filename-with-template/expected/async.css new file mode 100644 index 00000000..e665100a --- /dev/null +++ b/test/cases/filename-with-template/expected/async.css @@ -0,0 +1,4 @@ +.async { + color: red; +} + diff --git a/test/cases/filename-with-template/expected/main.css b/test/cases/filename-with-template/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/filename-with-template/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/filename-with-template/index.js b/test/cases/filename-with-template/index.js new file mode 100644 index 00000000..6eca02b4 --- /dev/null +++ b/test/cases/filename-with-template/index.js @@ -0,0 +1,4 @@ +import "./style.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "async" */ "./async.css"); diff --git a/test/cases/filename-with-template/style.css b/test/cases/filename-with-template/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/filename-with-template/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/filename-with-template/webpack.config.js b/test/cases/filename-with-template/webpack.config.js new file mode 100644 index 00000000..cf55c08c --- /dev/null +++ b/test/cases/filename-with-template/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/filename-without-template/async.css b/test/cases/filename-without-template/async.css new file mode 100644 index 00000000..b1645094 --- /dev/null +++ b/test/cases/filename-without-template/async.css @@ -0,0 +1,3 @@ +.async { + color: red; +} diff --git a/test/cases/filename-without-template/expected/0.main.css b/test/cases/filename-without-template/expected/0.main.css new file mode 100644 index 00000000..e665100a --- /dev/null +++ b/test/cases/filename-without-template/expected/0.main.css @@ -0,0 +1,4 @@ +.async { + color: red; +} + diff --git a/test/cases/filename-without-template/expected/main.css b/test/cases/filename-without-template/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/filename-without-template/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/filename-without-template/index.js b/test/cases/filename-without-template/index.js new file mode 100644 index 00000000..6eca02b4 --- /dev/null +++ b/test/cases/filename-without-template/index.js @@ -0,0 +1,4 @@ +import "./style.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "async" */ "./async.css"); diff --git a/test/cases/filename-without-template/style.css b/test/cases/filename-without-template/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/filename-without-template/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/filename-without-template/webpack.config.js b/test/cases/filename-without-template/webpack.config.js new file mode 100644 index 00000000..52a8abd6 --- /dev/null +++ b/test/cases/filename-without-template/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "main.css", + }), + ], +}; diff --git a/test/cases/hmr-locals/expected/main.css b/test/cases/hmr-locals/expected/main.css new file mode 100644 index 00000000..c5589a3f --- /dev/null +++ b/test/cases/hmr-locals/expected/main.css @@ -0,0 +1,7 @@ +/*!************************************************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!./index.css ***! + \************************************************************************************************/ +.VoofDB21D_QzDbRdwMiY { + color: red; +} + diff --git a/test/cases/hmr-locals/expected/main.js b/test/cases/hmr-locals/expected/main.js new file mode 100644 index 00000000..f79dd0ae --- /dev/null +++ b/test/cases/hmr-locals/expected/main.js @@ -0,0 +1,1625 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "../../../src/hmr/hotModuleReplacement.js": +/*!************************************************!*\ + !*** ../../../src/hmr/hotModuleReplacement.js ***! + \************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/* global document */ +/* + eslint-disable + no-console, + func-names +*/ + +const normalizeUrl = __webpack_require__(/*! ./normalize-url */ "../../../src/hmr/normalize-url.js"); + +const srcByModuleId = Object.create(null); + +const noDocument = typeof document === "undefined"; + +const { forEach } = Array.prototype; + +// eslint-disable-next-line jsdoc/no-restricted-syntax +/** + * @param {Function} fn any function + * @param {number} time time + * @returns {() => void} wrapped function + */ +function debounce(fn, time) { + let timeout = 0; + + return function () { + // @ts-expect-error + const self = this; + // eslint-disable-next-line prefer-rest-params + const args = arguments; + // eslint-disable-next-line func-style + const functionCall = function functionCall() { + return fn.apply(self, args); + }; + + clearTimeout(timeout); + + // @ts-expect-error + timeout = setTimeout(functionCall, time); + }; +} + +/** + * @returns {void} + */ +function noop() {} + +/** @typedef {(filename?: string) => string[]} GetScriptSrc */ + +/** + * @param {string | number} moduleId a module id + * @returns {GetScriptSrc} current script url + */ +function getCurrentScriptUrl(moduleId) { + let src = srcByModuleId[moduleId]; + + if (!src) { + if (document.currentScript) { + ({ src } = /** @type {HTMLScriptElement} */ (document.currentScript)); + } else { + const scripts = document.getElementsByTagName("script"); + const lastScriptTag = scripts[scripts.length - 1]; + + if (lastScriptTag) { + ({ src } = lastScriptTag); + } + } + + srcByModuleId[moduleId] = src; + } + + /** @type {GetScriptSrc} */ + return function (fileMap) { + if (!src) { + return []; + } + + const splitResult = src.split(/([^\\/]+)\.js$/); + const filename = splitResult && splitResult[1]; + + if (!filename) { + return [src.replace(".js", ".css")]; + } + + if (!fileMap) { + return [src.replace(".js", ".css")]; + } + + return fileMap.split(",").map((mapRule) => { + const reg = new RegExp(`${filename}\\.js$`, "g"); + + return normalizeUrl( + src.replace(reg, `${mapRule.replace(/{fileName}/g, filename)}.css`), + ); + }); + }; +} + +/** + * @param {string} url URL + * @returns {boolean} true when URL can be request, otherwise false + */ +function isUrlRequest(url) { + // An URL is not an request if + + // It is not http or https + if (!/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(url)) { + return false; + } + + return true; +} + +/** @typedef {HTMLLinkElement & { isLoaded: boolean, visited: boolean }} HotHTMLLinkElement */ + +/** + * @param {HotHTMLLinkElement} el html link element + * @param {string=} url a URL + */ +function updateCss(el, url) { + if (!url) { + if (!el.href) { + return; + } + + // eslint-disable-next-line + url = el.href.split("?")[0]; + } + + if (!isUrlRequest(/** @type {string} */ (url))) { + return; + } + + if (el.isLoaded === false) { + // We seem to be about to replace a css link that hasn't loaded yet. + // We're probably changing the same file more than once. + return; + } + + // eslint-disable-next-line unicorn/prefer-includes + if (!url || !(url.indexOf(".css") > -1)) { + return; + } + + el.visited = true; + + const newEl = + /** @type {HotHTMLLinkElement} */ + (el.cloneNode()); + + newEl.isLoaded = false; + + newEl.addEventListener("load", () => { + if (newEl.isLoaded) { + return; + } + + newEl.isLoaded = true; + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + }); + + newEl.addEventListener("error", () => { + if (newEl.isLoaded) { + return; + } + + newEl.isLoaded = true; + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + }); + + newEl.href = `${url}?${Date.now()}`; + + if (el.parentNode) { + if (el.nextSibling) { + el.parentNode.insertBefore(newEl, el.nextSibling); + } else { + el.parentNode.appendChild(newEl); + } + } +} + +/** + * @param {string} href href + * @param {string[]} src src + * @returns {undefined | string} a reload url + */ +function getReloadUrl(href, src) { + let ret; + + href = normalizeUrl(href); + + src.some( + /** + * @param {string} url url + */ + // eslint-disable-next-line array-callback-return + (url) => { + // @ts-expect-error fix me in the next major release + // eslint-disable-next-line unicorn/prefer-includes + if (href.indexOf(src) > -1) { + ret = url; + } + }, + ); + + return ret; +} + +/** + * @param {string[]} src source + * @returns {boolean} true when loaded, otherwise false + */ +function reloadStyle(src) { + const elements = document.querySelectorAll("link"); + let loaded = false; + + forEach.call(elements, (el) => { + if (!el.href) { + return; + } + + const url = getReloadUrl(el.href, src); + + if (url && !isUrlRequest(url)) { + return; + } + + if (el.visited === true) { + return; + } + + if (url) { + updateCss(el, url); + + loaded = true; + } + }); + + return loaded; +} + +/** + * @returns {void} + */ +function reloadAll() { + const elements = document.querySelectorAll("link"); + + forEach.call(elements, (el) => { + if (el.visited === true) { + return; + } + + updateCss(el); + }); +} + +/** + * @param {number | string} moduleId a module id + * @param {{ filename?: string, locals?: boolean }} options options + * @returns {() => void} wrapper function + */ +module.exports = function (moduleId, options) { + if (noDocument) { + console.log("no window.document found, will not HMR CSS"); + + return noop; + } + + const getScriptSrc = getCurrentScriptUrl(moduleId); + + /** + * @returns {void} + */ + function update() { + const src = getScriptSrc(options.filename); + const reloaded = reloadStyle(src); + + if (options.locals) { + console.log("[HMR] Detected local css modules. Reload all css"); + + reloadAll(); + + return; + } + + if (reloaded) { + console.log("[HMR] css reload %s", src.join(" ")); + } else { + console.log("[HMR] Reload all css"); + + reloadAll(); + } + } + + return debounce(update, 50); +}; + + +/***/ }), + +/***/ "../../../src/hmr/normalize-url.js": +/*!*****************************************!*\ + !*** ../../../src/hmr/normalize-url.js ***! + \*****************************************/ +/***/ ((module) => { + +/** + * @param {string[]} pathComponents path components + * @returns {string} normalized url + */ +function normalizeUrlInner(pathComponents) { + return pathComponents + .reduce((accumulator, item) => { + switch (item) { + case "..": + accumulator.pop(); + break; + case ".": + break; + default: + accumulator.push(item); + } + + return accumulator; + }, /** @type {string[]} */ ([])) + .join("/"); +} + +/** + * @param {string} urlString url string + * @returns {string} normalized url string + */ +module.exports = function normalizeUrl(urlString) { + urlString = urlString.trim(); + + if (/^data:/i.test(urlString)) { + return urlString; + } + + const protocol = + // eslint-disable-next-line unicorn/prefer-includes + urlString.indexOf("//") !== -1 ? `${urlString.split("//")[0]}//` : ""; + const components = urlString + .replace(new RegExp(protocol, "i"), "") + .split("/"); + const host = components[0].toLowerCase().replace(/\.$/, ""); + + components[0] = ""; + + const path = normalizeUrlInner(components); + + return protocol + host + path; +}; + + +/***/ }), + +/***/ "./index.css": +/*!*******************!*\ + !*** ./index.css ***! + \*******************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +// extracted by mini-css-extract-plugin +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"x":"VoofDB21D_QzDbRdwMiY"}); + if(true) { + (function() { + var localsJsonString = "{\"x\":\"VoofDB21D_QzDbRdwMiY\"}"; + // + var cssReload = __webpack_require__(/*! ../../../src/hmr/hotModuleReplacement.js */ "../../../src/hmr/hotModuleReplacement.js")(module.id, {}); + // only invalidate when locals change + if ( + module.hot.data && + module.hot.data.value && + module.hot.data.value !== localsJsonString + ) { + module.hot.invalidate(); + } else { + module.hot.accept(); + } + module.hot.dispose(function(data) { + data.value = localsJsonString; + cssReload(); + }); + })(); + } + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ if (cachedModule.error !== undefined) throw cachedModule.error; +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ try { +/******/ var execOptions = { id: moduleId, module: module, factory: __webpack_modules__[moduleId], require: __webpack_require__ }; +/******/ __webpack_require__.i.forEach(function(handler) { handler(execOptions); }); +/******/ module = execOptions.module; +/******/ execOptions.factory.call(module.exports, module, module.exports, execOptions.require); +/******/ } catch(e) { +/******/ module.error = e; +/******/ throw e; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = __webpack_module_cache__; +/******/ +/******/ // expose the module execution interceptor +/******/ __webpack_require__.i = []; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript update chunk filename */ +/******/ (() => { +/******/ // This function allow to reference all chunks +/******/ __webpack_require__.hu = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + "." + __webpack_require__.h() + ".hot-update.js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get mini-css chunk filename */ +/******/ (() => { +/******/ // This function allow to reference all chunks +/******/ __webpack_require__.miniCssF = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".css"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get update manifest filename */ +/******/ (() => { +/******/ __webpack_require__.hmrF = () => ("main." + __webpack_require__.h() + ".hot-update.json"); +/******/ })(); +/******/ +/******/ /* webpack/runtime/getFullHash */ +/******/ (() => { +/******/ __webpack_require__.h = () => ("xxxxxxxxxxxxxxxxxxxxxx") +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hot module replacement */ +/******/ (() => { +/******/ var currentModuleData = {}; +/******/ var installedModules = __webpack_require__.c; +/******/ +/******/ // module and require creation +/******/ var currentChildModule; +/******/ var currentParents = []; +/******/ +/******/ // status +/******/ var registeredStatusHandlers = []; +/******/ var currentStatus = "idle"; +/******/ +/******/ // while downloading +/******/ var blockingPromises = 0; +/******/ var blockingPromisesWaiting = []; +/******/ +/******/ // The update info +/******/ var currentUpdateApplyHandlers; +/******/ var queuedInvalidatedModules; +/******/ +/******/ __webpack_require__.hmrD = currentModuleData; +/******/ +/******/ __webpack_require__.i.push(function (options) { +/******/ var module = options.module; +/******/ var require = createRequire(options.require, options.id); +/******/ module.hot = createModuleHotObject(options.id, module); +/******/ module.parents = currentParents; +/******/ module.children = []; +/******/ currentParents = []; +/******/ options.require = require; +/******/ }); +/******/ +/******/ __webpack_require__.hmrC = {}; +/******/ __webpack_require__.hmrI = {}; +/******/ +/******/ function createRequire(require, moduleId) { +/******/ var me = installedModules[moduleId]; +/******/ if (!me) return require; +/******/ var fn = function (request) { +/******/ if (me.hot.active) { +/******/ if (installedModules[request]) { +/******/ var parents = installedModules[request].parents; +/******/ if (parents.indexOf(moduleId) === -1) { +/******/ parents.push(moduleId); +/******/ } +/******/ } else { +/******/ currentParents = [moduleId]; +/******/ currentChildModule = request; +/******/ } +/******/ if (me.children.indexOf(request) === -1) { +/******/ me.children.push(request); +/******/ } +/******/ } else { +/******/ console.warn( +/******/ "[HMR] unexpected require(" + +/******/ request + +/******/ ") from disposed module " + +/******/ moduleId +/******/ ); +/******/ currentParents = []; +/******/ } +/******/ return require(request); +/******/ }; +/******/ var createPropertyDescriptor = function (name) { +/******/ return { +/******/ configurable: true, +/******/ enumerable: true, +/******/ get: function () { +/******/ return require[name]; +/******/ }, +/******/ set: function (value) { +/******/ require[name] = value; +/******/ } +/******/ }; +/******/ }; +/******/ for (var name in require) { +/******/ if (Object.prototype.hasOwnProperty.call(require, name) && name !== "e") { +/******/ Object.defineProperty(fn, name, createPropertyDescriptor(name)); +/******/ } +/******/ } +/******/ fn.e = function (chunkId, fetchPriority) { +/******/ return trackBlockingPromise(require.e(chunkId, fetchPriority)); +/******/ }; +/******/ return fn; +/******/ } +/******/ +/******/ function createModuleHotObject(moduleId, me) { +/******/ var _main = currentChildModule !== moduleId; +/******/ var hot = { +/******/ // private stuff +/******/ _acceptedDependencies: {}, +/******/ _acceptedErrorHandlers: {}, +/******/ _declinedDependencies: {}, +/******/ _selfAccepted: false, +/******/ _selfDeclined: false, +/******/ _selfInvalidated: false, +/******/ _disposeHandlers: [], +/******/ _main: _main, +/******/ _requireSelf: function () { +/******/ currentParents = me.parents.slice(); +/******/ currentChildModule = _main ? undefined : moduleId; +/******/ __webpack_require__(moduleId); +/******/ }, +/******/ +/******/ // Module API +/******/ active: true, +/******/ accept: function (dep, callback, errorHandler) { +/******/ if (dep === undefined) hot._selfAccepted = true; +/******/ else if (typeof dep === "function") hot._selfAccepted = dep; +/******/ else if (typeof dep === "object" && dep !== null) { +/******/ for (var i = 0; i < dep.length; i++) { +/******/ hot._acceptedDependencies[dep[i]] = callback || function () {}; +/******/ hot._acceptedErrorHandlers[dep[i]] = errorHandler; +/******/ } +/******/ } else { +/******/ hot._acceptedDependencies[dep] = callback || function () {}; +/******/ hot._acceptedErrorHandlers[dep] = errorHandler; +/******/ } +/******/ }, +/******/ decline: function (dep) { +/******/ if (dep === undefined) hot._selfDeclined = true; +/******/ else if (typeof dep === "object" && dep !== null) +/******/ for (var i = 0; i < dep.length; i++) +/******/ hot._declinedDependencies[dep[i]] = true; +/******/ else hot._declinedDependencies[dep] = true; +/******/ }, +/******/ dispose: function (callback) { +/******/ hot._disposeHandlers.push(callback); +/******/ }, +/******/ addDisposeHandler: function (callback) { +/******/ hot._disposeHandlers.push(callback); +/******/ }, +/******/ removeDisposeHandler: function (callback) { +/******/ var idx = hot._disposeHandlers.indexOf(callback); +/******/ if (idx >= 0) hot._disposeHandlers.splice(idx, 1); +/******/ }, +/******/ invalidate: function () { +/******/ this._selfInvalidated = true; +/******/ switch (currentStatus) { +/******/ case "idle": +/******/ currentUpdateApplyHandlers = []; +/******/ Object.keys(__webpack_require__.hmrI).forEach(function (key) { +/******/ __webpack_require__.hmrI[key]( +/******/ moduleId, +/******/ currentUpdateApplyHandlers +/******/ ); +/******/ }); +/******/ setStatus("ready"); +/******/ break; +/******/ case "ready": +/******/ Object.keys(__webpack_require__.hmrI).forEach(function (key) { +/******/ __webpack_require__.hmrI[key]( +/******/ moduleId, +/******/ currentUpdateApplyHandlers +/******/ ); +/******/ }); +/******/ break; +/******/ case "prepare": +/******/ case "check": +/******/ case "dispose": +/******/ case "apply": +/******/ (queuedInvalidatedModules = queuedInvalidatedModules || []).push( +/******/ moduleId +/******/ ); +/******/ break; +/******/ default: +/******/ // ignore requests in error states +/******/ break; +/******/ } +/******/ }, +/******/ +/******/ // Management API +/******/ check: hotCheck, +/******/ apply: hotApply, +/******/ status: function (l) { +/******/ if (!l) return currentStatus; +/******/ registeredStatusHandlers.push(l); +/******/ }, +/******/ addStatusHandler: function (l) { +/******/ registeredStatusHandlers.push(l); +/******/ }, +/******/ removeStatusHandler: function (l) { +/******/ var idx = registeredStatusHandlers.indexOf(l); +/******/ if (idx >= 0) registeredStatusHandlers.splice(idx, 1); +/******/ }, +/******/ +/******/ // inherit from previous dispose call +/******/ data: currentModuleData[moduleId] +/******/ }; +/******/ currentChildModule = undefined; +/******/ return hot; +/******/ } +/******/ +/******/ function setStatus(newStatus) { +/******/ currentStatus = newStatus; +/******/ var results = []; +/******/ +/******/ for (var i = 0; i < registeredStatusHandlers.length; i++) +/******/ results[i] = registeredStatusHandlers[i].call(null, newStatus); +/******/ +/******/ return Promise.all(results).then(function () {}); +/******/ } +/******/ +/******/ function unblock() { +/******/ if (--blockingPromises === 0) { +/******/ setStatus("ready").then(function () { +/******/ if (blockingPromises === 0) { +/******/ var list = blockingPromisesWaiting; +/******/ blockingPromisesWaiting = []; +/******/ for (var i = 0; i < list.length; i++) { +/******/ list[i](); +/******/ } +/******/ } +/******/ }); +/******/ } +/******/ } +/******/ +/******/ function trackBlockingPromise(promise) { +/******/ switch (currentStatus) { +/******/ case "ready": +/******/ setStatus("prepare"); +/******/ /* fallthrough */ +/******/ case "prepare": +/******/ blockingPromises++; +/******/ promise.then(unblock, unblock); +/******/ return promise; +/******/ default: +/******/ return promise; +/******/ } +/******/ } +/******/ +/******/ function waitForBlockingPromises(fn) { +/******/ if (blockingPromises === 0) return fn(); +/******/ return new Promise(function (resolve) { +/******/ blockingPromisesWaiting.push(function () { +/******/ resolve(fn()); +/******/ }); +/******/ }); +/******/ } +/******/ +/******/ function hotCheck(applyOnUpdate) { +/******/ if (currentStatus !== "idle") { +/******/ throw new Error("check() is only allowed in idle status"); +/******/ } +/******/ return setStatus("check") +/******/ .then(__webpack_require__.hmrM) +/******/ .then(function (update) { +/******/ if (!update) { +/******/ return setStatus(applyInvalidatedModules() ? "ready" : "idle").then( +/******/ function () { +/******/ return null; +/******/ } +/******/ ); +/******/ } +/******/ +/******/ return setStatus("prepare").then(function () { +/******/ var updatedModules = []; +/******/ currentUpdateApplyHandlers = []; +/******/ +/******/ return Promise.all( +/******/ Object.keys(__webpack_require__.hmrC).reduce(function ( +/******/ promises, +/******/ key +/******/ ) { +/******/ __webpack_require__.hmrC[key]( +/******/ update.c, +/******/ update.r, +/******/ update.m, +/******/ promises, +/******/ currentUpdateApplyHandlers, +/******/ updatedModules +/******/ ); +/******/ return promises; +/******/ }, []) +/******/ ).then(function () { +/******/ return waitForBlockingPromises(function () { +/******/ if (applyOnUpdate) { +/******/ return internalApply(applyOnUpdate); +/******/ } +/******/ return setStatus("ready").then(function () { +/******/ return updatedModules; +/******/ }); +/******/ }); +/******/ }); +/******/ }); +/******/ }); +/******/ } +/******/ +/******/ function hotApply(options) { +/******/ if (currentStatus !== "ready") { +/******/ return Promise.resolve().then(function () { +/******/ throw new Error( +/******/ "apply() is only allowed in ready status (state: " + +/******/ currentStatus + +/******/ ")" +/******/ ); +/******/ }); +/******/ } +/******/ return internalApply(options); +/******/ } +/******/ +/******/ function internalApply(options) { +/******/ options = options || {}; +/******/ +/******/ applyInvalidatedModules(); +/******/ +/******/ var results = currentUpdateApplyHandlers.map(function (handler) { +/******/ return handler(options); +/******/ }); +/******/ currentUpdateApplyHandlers = undefined; +/******/ +/******/ var errors = results +/******/ .map(function (r) { +/******/ return r.error; +/******/ }) +/******/ .filter(Boolean); +/******/ +/******/ if (errors.length > 0) { +/******/ return setStatus("abort").then(function () { +/******/ throw errors[0]; +/******/ }); +/******/ } +/******/ +/******/ // Now in "dispose" phase +/******/ var disposePromise = setStatus("dispose"); +/******/ +/******/ results.forEach(function (result) { +/******/ if (result.dispose) result.dispose(); +/******/ }); +/******/ +/******/ // Now in "apply" phase +/******/ var applyPromise = setStatus("apply"); +/******/ +/******/ var error; +/******/ var reportError = function (err) { +/******/ if (!error) error = err; +/******/ }; +/******/ +/******/ var outdatedModules = []; +/******/ +/******/ var onAccepted = function () { +/******/ return Promise.all([disposePromise, applyPromise]).then(function () { +/******/ // handle errors in accept handlers and self accepted module load +/******/ if (error) { +/******/ return setStatus("fail").then(function () { +/******/ throw error; +/******/ }); +/******/ } +/******/ +/******/ if (queuedInvalidatedModules) { +/******/ return internalApply(options).then(function (list) { +/******/ outdatedModules.forEach(function (moduleId) { +/******/ if (list.indexOf(moduleId) < 0) list.push(moduleId); +/******/ }); +/******/ return list; +/******/ }); +/******/ } +/******/ +/******/ return setStatus("idle").then(function () { +/******/ return outdatedModules; +/******/ }); +/******/ }); +/******/ }; +/******/ +/******/ return Promise.all( +/******/ results +/******/ .filter(function (result) { +/******/ return result.apply; +/******/ }) +/******/ .map(function (result) { +/******/ return result.apply(reportError); +/******/ }) +/******/ ) +/******/ .then(function (applyResults) { +/******/ applyResults.forEach(function (modules) { +/******/ if (modules) { +/******/ for (var i = 0; i < modules.length; i++) { +/******/ outdatedModules.push(modules[i]); +/******/ } +/******/ } +/******/ }); +/******/ }) +/******/ .then(onAccepted); +/******/ } +/******/ +/******/ function applyInvalidatedModules() { +/******/ if (queuedInvalidatedModules) { +/******/ if (!currentUpdateApplyHandlers) currentUpdateApplyHandlers = []; +/******/ Object.keys(__webpack_require__.hmrI).forEach(function (key) { +/******/ queuedInvalidatedModules.forEach(function (moduleId) { +/******/ __webpack_require__.hmrI[key]( +/******/ moduleId, +/******/ currentUpdateApplyHandlers +/******/ ); +/******/ }); +/******/ }); +/******/ queuedInvalidatedModules = undefined; +/******/ return true; +/******/ } +/******/ } +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/css loading */ +/******/ (() => { +/******/ if (typeof document === "undefined") return; +/******/ var createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => { +/******/ var linkTag = document.createElement("link"); +/******/ +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ if (__webpack_require__.nc) { +/******/ linkTag.nonce = __webpack_require__.nc; +/******/ } +/******/ var onLinkComplete = (event) => { +/******/ // avoid mem leaks. +/******/ linkTag.onerror = linkTag.onload = null; +/******/ if (event.type === 'load') { +/******/ resolve(); +/******/ } else { +/******/ var errorType = event && event.type; +/******/ var realHref = event && event.target && event.target.href || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + errorType + ": " + realHref + ")"); +/******/ err.name = "ChunkLoadError"; +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.type = errorType; +/******/ err.request = realHref; +/******/ if (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ } +/******/ } +/******/ linkTag.onerror = linkTag.onload = onLinkComplete; +/******/ linkTag.href = fullhref; +/******/ +/******/ +/******/ if (oldTag) { +/******/ oldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling); +/******/ } else { +/******/ document.head.appendChild(linkTag); +/******/ } +/******/ return linkTag; +/******/ }; +/******/ var findStylesheet = (href, fullhref) => { +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag; +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return tag; +/******/ } +/******/ }; +/******/ var loadStylesheet = (chunkId) => { +/******/ return new Promise((resolve, reject) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ if(findStylesheet(href, fullhref)) return resolve(); +/******/ createStylesheet(chunkId, fullhref, null, resolve, reject); +/******/ }); +/******/ } +/******/ // no chunk loading +/******/ +/******/ var oldTags = []; +/******/ var newTags = []; +/******/ var applyHandler = (options) => { +/******/ return { dispose: () => { +/******/ for(var i = 0; i < oldTags.length; i++) { +/******/ var oldTag = oldTags[i]; +/******/ if(oldTag.parentNode) oldTag.parentNode.removeChild(oldTag); +/******/ } +/******/ oldTags.length = 0; +/******/ }, apply: () => { +/******/ for(var i = 0; i < newTags.length; i++) newTags[i].rel = "stylesheet"; +/******/ newTags.length = 0; +/******/ } }; +/******/ } +/******/ __webpack_require__.hmrC.miniCss = (chunkIds, removedChunks, removedModules, promises, applyHandlers, updatedModulesList) => { +/******/ applyHandlers.push(applyHandler); +/******/ chunkIds.forEach((chunkId) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ var oldTag = findStylesheet(href, fullhref); +/******/ if(!oldTag) return; +/******/ promises.push(new Promise((resolve, reject) => { +/******/ var tag = createStylesheet(chunkId, fullhref, oldTag, () => { +/******/ tag.as = "style"; +/******/ tag.rel = "preload"; +/******/ resolve(); +/******/ }, reject); +/******/ oldTags.push(oldTag); +/******/ newTags.push(tag); +/******/ })); +/******/ }); +/******/ } +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = __webpack_require__.hmrS_jsonp = __webpack_require__.hmrS_jsonp || { +/******/ "main": 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ var currentUpdatedModulesList; +/******/ var waitingUpdateResolves = {}; +/******/ function loadUpdateChunk(chunkId, updatedModulesList) { +/******/ currentUpdatedModulesList = updatedModulesList; +/******/ return new Promise((resolve, reject) => { +/******/ waitingUpdateResolves[chunkId] = resolve; +/******/ // start update chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.hu(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(waitingUpdateResolves[chunkId]) { +/******/ waitingUpdateResolves[chunkId] = undefined +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading hot update chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ reject(error); +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded); +/******/ }); +/******/ } +/******/ +/******/ self["webpackHotUpdate"] = (chunkId, moreModules, runtime) => { +/******/ for(var moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ currentUpdate[moduleId] = moreModules[moduleId]; +/******/ if(currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId); +/******/ } +/******/ } +/******/ if(runtime) currentUpdateRuntime.push(runtime); +/******/ if(waitingUpdateResolves[chunkId]) { +/******/ waitingUpdateResolves[chunkId](); +/******/ waitingUpdateResolves[chunkId] = undefined; +/******/ } +/******/ }; +/******/ +/******/ var currentUpdateChunks; +/******/ var currentUpdate; +/******/ var currentUpdateRemovedChunks; +/******/ var currentUpdateRuntime; +/******/ function applyHandler(options) { +/******/ if (__webpack_require__.f) delete __webpack_require__.f.jsonpHmr; +/******/ currentUpdateChunks = undefined; +/******/ function getAffectedModuleEffects(updateModuleId) { +/******/ var outdatedModules = [updateModuleId]; +/******/ var outdatedDependencies = {}; +/******/ +/******/ var queue = outdatedModules.map(function (id) { +/******/ return { +/******/ chain: [id], +/******/ id: id +/******/ }; +/******/ }); +/******/ while (queue.length > 0) { +/******/ var queueItem = queue.pop(); +/******/ var moduleId = queueItem.id; +/******/ var chain = queueItem.chain; +/******/ var module = __webpack_require__.c[moduleId]; +/******/ if ( +/******/ !module || +/******/ (module.hot._selfAccepted && !module.hot._selfInvalidated) +/******/ ) +/******/ continue; +/******/ if (module.hot._selfDeclined) { +/******/ return { +/******/ type: "self-declined", +/******/ chain: chain, +/******/ moduleId: moduleId +/******/ }; +/******/ } +/******/ if (module.hot._main) { +/******/ return { +/******/ type: "unaccepted", +/******/ chain: chain, +/******/ moduleId: moduleId +/******/ }; +/******/ } +/******/ for (var i = 0; i < module.parents.length; i++) { +/******/ var parentId = module.parents[i]; +/******/ var parent = __webpack_require__.c[parentId]; +/******/ if (!parent) continue; +/******/ if (parent.hot._declinedDependencies[moduleId]) { +/******/ return { +/******/ type: "declined", +/******/ chain: chain.concat([parentId]), +/******/ moduleId: moduleId, +/******/ parentId: parentId +/******/ }; +/******/ } +/******/ if (outdatedModules.indexOf(parentId) !== -1) continue; +/******/ if (parent.hot._acceptedDependencies[moduleId]) { +/******/ if (!outdatedDependencies[parentId]) +/******/ outdatedDependencies[parentId] = []; +/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]); +/******/ continue; +/******/ } +/******/ delete outdatedDependencies[parentId]; +/******/ outdatedModules.push(parentId); +/******/ queue.push({ +/******/ chain: chain.concat([parentId]), +/******/ id: parentId +/******/ }); +/******/ } +/******/ } +/******/ +/******/ return { +/******/ type: "accepted", +/******/ moduleId: updateModuleId, +/******/ outdatedModules: outdatedModules, +/******/ outdatedDependencies: outdatedDependencies +/******/ }; +/******/ } +/******/ +/******/ function addAllToSet(a, b) { +/******/ for (var i = 0; i < b.length; i++) { +/******/ var item = b[i]; +/******/ if (a.indexOf(item) === -1) a.push(item); +/******/ } +/******/ } +/******/ +/******/ // at begin all updates modules are outdated +/******/ // the "outdated" status can propagate to parents if they don't accept the children +/******/ var outdatedDependencies = {}; +/******/ var outdatedModules = []; +/******/ var appliedUpdate = {}; +/******/ +/******/ var warnUnexpectedRequire = function warnUnexpectedRequire(module) { +/******/ console.warn( +/******/ "[HMR] unexpected require(" + module.id + ") to disposed module" +/******/ ); +/******/ }; +/******/ +/******/ for (var moduleId in currentUpdate) { +/******/ if (__webpack_require__.o(currentUpdate, moduleId)) { +/******/ var newModuleFactory = currentUpdate[moduleId]; +/******/ var result = newModuleFactory +/******/ ? getAffectedModuleEffects(moduleId) +/******/ : { +/******/ type: "disposed", +/******/ moduleId: moduleId +/******/ }; +/******/ /** @type {Error|false} */ +/******/ var abortError = false; +/******/ var doApply = false; +/******/ var doDispose = false; +/******/ var chainInfo = ""; +/******/ if (result.chain) { +/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> "); +/******/ } +/******/ switch (result.type) { +/******/ case "self-declined": +/******/ if (options.onDeclined) options.onDeclined(result); +/******/ if (!options.ignoreDeclined) +/******/ abortError = new Error( +/******/ "Aborted because of self decline: " + +/******/ result.moduleId + +/******/ chainInfo +/******/ ); +/******/ break; +/******/ case "declined": +/******/ if (options.onDeclined) options.onDeclined(result); +/******/ if (!options.ignoreDeclined) +/******/ abortError = new Error( +/******/ "Aborted because of declined dependency: " + +/******/ result.moduleId + +/******/ " in " + +/******/ result.parentId + +/******/ chainInfo +/******/ ); +/******/ break; +/******/ case "unaccepted": +/******/ if (options.onUnaccepted) options.onUnaccepted(result); +/******/ if (!options.ignoreUnaccepted) +/******/ abortError = new Error( +/******/ "Aborted because " + moduleId + " is not accepted" + chainInfo +/******/ ); +/******/ break; +/******/ case "accepted": +/******/ if (options.onAccepted) options.onAccepted(result); +/******/ doApply = true; +/******/ break; +/******/ case "disposed": +/******/ if (options.onDisposed) options.onDisposed(result); +/******/ doDispose = true; +/******/ break; +/******/ default: +/******/ throw new Error("Unexception type " + result.type); +/******/ } +/******/ if (abortError) { +/******/ return { +/******/ error: abortError +/******/ }; +/******/ } +/******/ if (doApply) { +/******/ appliedUpdate[moduleId] = newModuleFactory; +/******/ addAllToSet(outdatedModules, result.outdatedModules); +/******/ for (moduleId in result.outdatedDependencies) { +/******/ if (__webpack_require__.o(result.outdatedDependencies, moduleId)) { +/******/ if (!outdatedDependencies[moduleId]) +/******/ outdatedDependencies[moduleId] = []; +/******/ addAllToSet( +/******/ outdatedDependencies[moduleId], +/******/ result.outdatedDependencies[moduleId] +/******/ ); +/******/ } +/******/ } +/******/ } +/******/ if (doDispose) { +/******/ addAllToSet(outdatedModules, [result.moduleId]); +/******/ appliedUpdate[moduleId] = warnUnexpectedRequire; +/******/ } +/******/ } +/******/ } +/******/ currentUpdate = undefined; +/******/ +/******/ // Store self accepted outdated modules to require them later by the module system +/******/ var outdatedSelfAcceptedModules = []; +/******/ for (var j = 0; j < outdatedModules.length; j++) { +/******/ var outdatedModuleId = outdatedModules[j]; +/******/ var module = __webpack_require__.c[outdatedModuleId]; +/******/ if ( +/******/ module && +/******/ (module.hot._selfAccepted || module.hot._main) && +/******/ // removed self-accepted modules should not be required +/******/ appliedUpdate[outdatedModuleId] !== warnUnexpectedRequire && +/******/ // when called invalidate self-accepting is not possible +/******/ !module.hot._selfInvalidated +/******/ ) { +/******/ outdatedSelfAcceptedModules.push({ +/******/ module: outdatedModuleId, +/******/ require: module.hot._requireSelf, +/******/ errorHandler: module.hot._selfAccepted +/******/ }); +/******/ } +/******/ } +/******/ +/******/ var moduleOutdatedDependencies; +/******/ +/******/ return { +/******/ dispose: function () { +/******/ currentUpdateRemovedChunks.forEach(function (chunkId) { +/******/ delete installedChunks[chunkId]; +/******/ }); +/******/ currentUpdateRemovedChunks = undefined; +/******/ +/******/ var idx; +/******/ var queue = outdatedModules.slice(); +/******/ while (queue.length > 0) { +/******/ var moduleId = queue.pop(); +/******/ var module = __webpack_require__.c[moduleId]; +/******/ if (!module) continue; +/******/ +/******/ var data = {}; +/******/ +/******/ // Call dispose handlers +/******/ var disposeHandlers = module.hot._disposeHandlers; +/******/ for (j = 0; j < disposeHandlers.length; j++) { +/******/ disposeHandlers[j].call(null, data); +/******/ } +/******/ __webpack_require__.hmrD[moduleId] = data; +/******/ +/******/ // disable module (this disables requires from this module) +/******/ module.hot.active = false; +/******/ +/******/ // remove module from cache +/******/ delete __webpack_require__.c[moduleId]; +/******/ +/******/ // when disposing there is no need to call dispose handler +/******/ delete outdatedDependencies[moduleId]; +/******/ +/******/ // remove "parents" references from all children +/******/ for (j = 0; j < module.children.length; j++) { +/******/ var child = __webpack_require__.c[module.children[j]]; +/******/ if (!child) continue; +/******/ idx = child.parents.indexOf(moduleId); +/******/ if (idx >= 0) { +/******/ child.parents.splice(idx, 1); +/******/ } +/******/ } +/******/ } +/******/ +/******/ // remove outdated dependency from module children +/******/ var dependency; +/******/ for (var outdatedModuleId in outdatedDependencies) { +/******/ if (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) { +/******/ module = __webpack_require__.c[outdatedModuleId]; +/******/ if (module) { +/******/ moduleOutdatedDependencies = +/******/ outdatedDependencies[outdatedModuleId]; +/******/ for (j = 0; j < moduleOutdatedDependencies.length; j++) { +/******/ dependency = moduleOutdatedDependencies[j]; +/******/ idx = module.children.indexOf(dependency); +/******/ if (idx >= 0) module.children.splice(idx, 1); +/******/ } +/******/ } +/******/ } +/******/ } +/******/ }, +/******/ apply: function (reportError) { +/******/ var acceptPromises = []; +/******/ // insert new code +/******/ for (var updateModuleId in appliedUpdate) { +/******/ if (__webpack_require__.o(appliedUpdate, updateModuleId)) { +/******/ __webpack_require__.m[updateModuleId] = appliedUpdate[updateModuleId]; +/******/ } +/******/ } +/******/ +/******/ // run new runtime modules +/******/ for (var i = 0; i < currentUpdateRuntime.length; i++) { +/******/ currentUpdateRuntime[i](__webpack_require__); +/******/ } +/******/ +/******/ // call accept handlers +/******/ for (var outdatedModuleId in outdatedDependencies) { +/******/ if (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) { +/******/ var module = __webpack_require__.c[outdatedModuleId]; +/******/ if (module) { +/******/ moduleOutdatedDependencies = +/******/ outdatedDependencies[outdatedModuleId]; +/******/ var callbacks = []; +/******/ var errorHandlers = []; +/******/ var dependenciesForCallbacks = []; +/******/ for (var j = 0; j < moduleOutdatedDependencies.length; j++) { +/******/ var dependency = moduleOutdatedDependencies[j]; +/******/ var acceptCallback = +/******/ module.hot._acceptedDependencies[dependency]; +/******/ var errorHandler = +/******/ module.hot._acceptedErrorHandlers[dependency]; +/******/ if (acceptCallback) { +/******/ if (callbacks.indexOf(acceptCallback) !== -1) continue; +/******/ callbacks.push(acceptCallback); +/******/ errorHandlers.push(errorHandler); +/******/ dependenciesForCallbacks.push(dependency); +/******/ } +/******/ } +/******/ for (var k = 0; k < callbacks.length; k++) { +/******/ var result; +/******/ try { +/******/ result = callbacks[k].call(null, moduleOutdatedDependencies); +/******/ } catch (err) { +/******/ if (typeof errorHandlers[k] === "function") { +/******/ try { +/******/ errorHandlers[k](err, { +/******/ moduleId: outdatedModuleId, +/******/ dependencyId: dependenciesForCallbacks[k] +/******/ }); +/******/ } catch (err2) { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "accept-error-handler-errored", +/******/ moduleId: outdatedModuleId, +/******/ dependencyId: dependenciesForCallbacks[k], +/******/ error: err2, +/******/ originalError: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ reportError(err2); +/******/ reportError(err); +/******/ } +/******/ } +/******/ } else { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "accept-errored", +/******/ moduleId: outdatedModuleId, +/******/ dependencyId: dependenciesForCallbacks[k], +/******/ error: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ reportError(err); +/******/ } +/******/ } +/******/ } +/******/ if (result && typeof result.then === "function") { +/******/ acceptPromises.push(result); +/******/ } +/******/ } +/******/ } +/******/ } +/******/ } +/******/ +/******/ var onAccepted = function () { +/******/ // Load self accepted modules +/******/ for (var o = 0; o < outdatedSelfAcceptedModules.length; o++) { +/******/ var item = outdatedSelfAcceptedModules[o]; +/******/ var moduleId = item.module; +/******/ try { +/******/ item.require(moduleId); +/******/ } catch (err) { +/******/ if (typeof item.errorHandler === "function") { +/******/ try { +/******/ item.errorHandler(err, { +/******/ moduleId: moduleId, +/******/ module: __webpack_require__.c[moduleId] +/******/ }); +/******/ } catch (err1) { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "self-accept-error-handler-errored", +/******/ moduleId: moduleId, +/******/ error: err1, +/******/ originalError: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ reportError(err1); +/******/ reportError(err); +/******/ } +/******/ } +/******/ } else { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "self-accept-errored", +/******/ moduleId: moduleId, +/******/ error: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ reportError(err); +/******/ } +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ return Promise.all(acceptPromises) +/******/ .then(onAccepted) +/******/ .then(function () { +/******/ return outdatedModules; +/******/ }); +/******/ } +/******/ }; +/******/ } +/******/ __webpack_require__.hmrI.jsonp = function (moduleId, applyHandlers) { +/******/ if (!currentUpdate) { +/******/ currentUpdate = {}; +/******/ currentUpdateRuntime = []; +/******/ currentUpdateRemovedChunks = []; +/******/ applyHandlers.push(applyHandler); +/******/ } +/******/ if (!__webpack_require__.o(currentUpdate, moduleId)) { +/******/ currentUpdate[moduleId] = __webpack_require__.m[moduleId]; +/******/ } +/******/ }; +/******/ __webpack_require__.hmrC.jsonp = function ( +/******/ chunkIds, +/******/ removedChunks, +/******/ removedModules, +/******/ promises, +/******/ applyHandlers, +/******/ updatedModulesList +/******/ ) { +/******/ applyHandlers.push(applyHandler); +/******/ currentUpdateChunks = {}; +/******/ currentUpdateRemovedChunks = removedChunks; +/******/ currentUpdate = removedModules.reduce(function (obj, key) { +/******/ obj[key] = false; +/******/ return obj; +/******/ }, {}); +/******/ currentUpdateRuntime = []; +/******/ chunkIds.forEach(function (chunkId) { +/******/ if ( +/******/ __webpack_require__.o(installedChunks, chunkId) && +/******/ installedChunks[chunkId] !== undefined +/******/ ) { +/******/ promises.push(loadUpdateChunk(chunkId, updatedModulesList)); +/******/ currentUpdateChunks[chunkId] = true; +/******/ } else { +/******/ currentUpdateChunks[chunkId] = false; +/******/ } +/******/ }); +/******/ if (__webpack_require__.f) { +/******/ __webpack_require__.f.jsonpHmr = function (chunkId, promises) { +/******/ if ( +/******/ currentUpdateChunks && +/******/ __webpack_require__.o(currentUpdateChunks, chunkId) && +/******/ !currentUpdateChunks[chunkId] +/******/ ) { +/******/ promises.push(loadUpdateChunk(chunkId)); +/******/ currentUpdateChunks[chunkId] = true; +/******/ } +/******/ }; +/******/ } +/******/ }; +/******/ +/******/ __webpack_require__.hmrM = () => { +/******/ if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API"); +/******/ return fetch(__webpack_require__.p + __webpack_require__.hmrF()).then((response) => { +/******/ if(response.status === 404) return; // no update available +/******/ if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText); +/******/ return response.json(); +/******/ }); +/******/ }; +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // no jsonp function +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // module cache are used so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ var __webpack_exports__ = __webpack_require__("./index.css"); +/******/ +/******/ })() +; \ No newline at end of file diff --git a/test/cases/hmr-locals/index.css b/test/cases/hmr-locals/index.css new file mode 100644 index 00000000..739f1581 --- /dev/null +++ b/test/cases/hmr-locals/index.css @@ -0,0 +1,3 @@ +.x { + color: red; +} diff --git a/test/cases/hmr-locals/webpack.config.js b/test/cases/hmr-locals/webpack.config.js new file mode 100644 index 00000000..639b6511 --- /dev/null +++ b/test/cases/hmr-locals/webpack.config.js @@ -0,0 +1,33 @@ +import { HotModuleReplacementPlugin } from "webpack"; + +import Self from "../../../src"; + +module.exports = { + entry: "./index.css", + mode: "development", + devtool: false, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + modules: true, + }, + }, + ], + }, + ], + }, + plugins: [ + new HotModuleReplacementPlugin(), + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/hmr/a.css b/test/cases/hmr/a.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/hmr/a.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/hmr/b.css b/test/cases/hmr/b.css new file mode 100644 index 00000000..5e0da74e --- /dev/null +++ b/test/cases/hmr/b.css @@ -0,0 +1,9 @@ +.b { + background: red; +} + +@import url("https://some/external/css"); + +.b { + color: yellow; +} diff --git a/test/cases/hmr/c.css b/test/cases/hmr/c.css new file mode 100644 index 00000000..7760f9b4 --- /dev/null +++ b/test/cases/hmr/c.css @@ -0,0 +1,9 @@ +.c { + background: red; +} +@import "https://github.com/a.css"; +@import url("https://some/other/external/css"); + +.c { + color: yellow; +} diff --git a/test/cases/hmr/expected/main.css b/test/cases/hmr/expected/main.css new file mode 100644 index 00000000..729f48f8 --- /dev/null +++ b/test/cases/hmr/expected/main.css @@ -0,0 +1,42 @@ +/*!****************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./c.css ***! + \****************************************************************/ +@import url(https://some/other/external/css); +/*!****************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./b.css ***! + \****************************************************************/ +@import url(https://some/external/css); +/*!****************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./a.css ***! + \****************************************************************/ +body { + background: red; +} + +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./c.css (1) ***! + \********************************************************************/ +.c { + background: red; +} + +.c { + color: yellow; +} + +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./b.css (1) ***! + \********************************************************************/ +.b { + background: red; +} + +.b { + color: yellow; +} + +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./index.css ***! + \********************************************************************/ + + diff --git a/test/cases/hmr/expected/main.js b/test/cases/hmr/expected/main.js new file mode 100644 index 00000000..18d101bc --- /dev/null +++ b/test/cases/hmr/expected/main.js @@ -0,0 +1,1610 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "../../../src/hmr/hotModuleReplacement.js": +/*!************************************************!*\ + !*** ../../../src/hmr/hotModuleReplacement.js ***! + \************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/* global document */ +/* + eslint-disable + no-console, + func-names +*/ + +const normalizeUrl = __webpack_require__(/*! ./normalize-url */ "../../../src/hmr/normalize-url.js"); + +const srcByModuleId = Object.create(null); + +const noDocument = typeof document === "undefined"; + +const { forEach } = Array.prototype; + +// eslint-disable-next-line jsdoc/no-restricted-syntax +/** + * @param {Function} fn any function + * @param {number} time time + * @returns {() => void} wrapped function + */ +function debounce(fn, time) { + let timeout = 0; + + return function () { + // @ts-expect-error + const self = this; + // eslint-disable-next-line prefer-rest-params + const args = arguments; + // eslint-disable-next-line func-style + const functionCall = function functionCall() { + return fn.apply(self, args); + }; + + clearTimeout(timeout); + + // @ts-expect-error + timeout = setTimeout(functionCall, time); + }; +} + +/** + * @returns {void} + */ +function noop() {} + +/** @typedef {(filename?: string) => string[]} GetScriptSrc */ + +/** + * @param {string | number} moduleId a module id + * @returns {GetScriptSrc} current script url + */ +function getCurrentScriptUrl(moduleId) { + let src = srcByModuleId[moduleId]; + + if (!src) { + if (document.currentScript) { + ({ src } = /** @type {HTMLScriptElement} */ (document.currentScript)); + } else { + const scripts = document.getElementsByTagName("script"); + const lastScriptTag = scripts[scripts.length - 1]; + + if (lastScriptTag) { + ({ src } = lastScriptTag); + } + } + + srcByModuleId[moduleId] = src; + } + + /** @type {GetScriptSrc} */ + return function (fileMap) { + if (!src) { + return []; + } + + const splitResult = src.split(/([^\\/]+)\.js$/); + const filename = splitResult && splitResult[1]; + + if (!filename) { + return [src.replace(".js", ".css")]; + } + + if (!fileMap) { + return [src.replace(".js", ".css")]; + } + + return fileMap.split(",").map((mapRule) => { + const reg = new RegExp(`${filename}\\.js$`, "g"); + + return normalizeUrl( + src.replace(reg, `${mapRule.replace(/{fileName}/g, filename)}.css`), + ); + }); + }; +} + +/** + * @param {string} url URL + * @returns {boolean} true when URL can be request, otherwise false + */ +function isUrlRequest(url) { + // An URL is not an request if + + // It is not http or https + if (!/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(url)) { + return false; + } + + return true; +} + +/** @typedef {HTMLLinkElement & { isLoaded: boolean, visited: boolean }} HotHTMLLinkElement */ + +/** + * @param {HotHTMLLinkElement} el html link element + * @param {string=} url a URL + */ +function updateCss(el, url) { + if (!url) { + if (!el.href) { + return; + } + + // eslint-disable-next-line + url = el.href.split("?")[0]; + } + + if (!isUrlRequest(/** @type {string} */ (url))) { + return; + } + + if (el.isLoaded === false) { + // We seem to be about to replace a css link that hasn't loaded yet. + // We're probably changing the same file more than once. + return; + } + + // eslint-disable-next-line unicorn/prefer-includes + if (!url || !(url.indexOf(".css") > -1)) { + return; + } + + el.visited = true; + + const newEl = + /** @type {HotHTMLLinkElement} */ + (el.cloneNode()); + + newEl.isLoaded = false; + + newEl.addEventListener("load", () => { + if (newEl.isLoaded) { + return; + } + + newEl.isLoaded = true; + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + }); + + newEl.addEventListener("error", () => { + if (newEl.isLoaded) { + return; + } + + newEl.isLoaded = true; + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + }); + + newEl.href = `${url}?${Date.now()}`; + + if (el.parentNode) { + if (el.nextSibling) { + el.parentNode.insertBefore(newEl, el.nextSibling); + } else { + el.parentNode.appendChild(newEl); + } + } +} + +/** + * @param {string} href href + * @param {string[]} src src + * @returns {undefined | string} a reload url + */ +function getReloadUrl(href, src) { + let ret; + + href = normalizeUrl(href); + + src.some( + /** + * @param {string} url url + */ + // eslint-disable-next-line array-callback-return + (url) => { + // @ts-expect-error fix me in the next major release + // eslint-disable-next-line unicorn/prefer-includes + if (href.indexOf(src) > -1) { + ret = url; + } + }, + ); + + return ret; +} + +/** + * @param {string[]} src source + * @returns {boolean} true when loaded, otherwise false + */ +function reloadStyle(src) { + const elements = document.querySelectorAll("link"); + let loaded = false; + + forEach.call(elements, (el) => { + if (!el.href) { + return; + } + + const url = getReloadUrl(el.href, src); + + if (url && !isUrlRequest(url)) { + return; + } + + if (el.visited === true) { + return; + } + + if (url) { + updateCss(el, url); + + loaded = true; + } + }); + + return loaded; +} + +/** + * @returns {void} + */ +function reloadAll() { + const elements = document.querySelectorAll("link"); + + forEach.call(elements, (el) => { + if (el.visited === true) { + return; + } + + updateCss(el); + }); +} + +/** + * @param {number | string} moduleId a module id + * @param {{ filename?: string, locals?: boolean }} options options + * @returns {() => void} wrapper function + */ +module.exports = function (moduleId, options) { + if (noDocument) { + console.log("no window.document found, will not HMR CSS"); + + return noop; + } + + const getScriptSrc = getCurrentScriptUrl(moduleId); + + /** + * @returns {void} + */ + function update() { + const src = getScriptSrc(options.filename); + const reloaded = reloadStyle(src); + + if (options.locals) { + console.log("[HMR] Detected local css modules. Reload all css"); + + reloadAll(); + + return; + } + + if (reloaded) { + console.log("[HMR] css reload %s", src.join(" ")); + } else { + console.log("[HMR] Reload all css"); + + reloadAll(); + } + } + + return debounce(update, 50); +}; + + +/***/ }), + +/***/ "../../../src/hmr/normalize-url.js": +/*!*****************************************!*\ + !*** ../../../src/hmr/normalize-url.js ***! + \*****************************************/ +/***/ ((module) => { + +/** + * @param {string[]} pathComponents path components + * @returns {string} normalized url + */ +function normalizeUrlInner(pathComponents) { + return pathComponents + .reduce((accumulator, item) => { + switch (item) { + case "..": + accumulator.pop(); + break; + case ".": + break; + default: + accumulator.push(item); + } + + return accumulator; + }, /** @type {string[]} */ ([])) + .join("/"); +} + +/** + * @param {string} urlString url string + * @returns {string} normalized url string + */ +module.exports = function normalizeUrl(urlString) { + urlString = urlString.trim(); + + if (/^data:/i.test(urlString)) { + return urlString; + } + + const protocol = + // eslint-disable-next-line unicorn/prefer-includes + urlString.indexOf("//") !== -1 ? `${urlString.split("//")[0]}//` : ""; + const components = urlString + .replace(new RegExp(protocol, "i"), "") + .split("/"); + const host = components[0].toLowerCase().replace(/\.$/, ""); + + components[0] = ""; + + const path = normalizeUrlInner(components); + + return protocol + host + path; +}; + + +/***/ }), + +/***/ "./index.css": +/*!*******************!*\ + !*** ./index.css ***! + \*******************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + if(true) { + (function() { + var localsJsonString = undefined; + // + var cssReload = __webpack_require__(/*! ../../../src/hmr/hotModuleReplacement.js */ "../../../src/hmr/hotModuleReplacement.js")(module.id, {}); + // only invalidate when locals change + if ( + module.hot.data && + module.hot.data.value && + module.hot.data.value !== localsJsonString + ) { + module.hot.invalidate(); + } else { + module.hot.accept(); + } + module.hot.dispose(function(data) { + data.value = localsJsonString; + cssReload(); + }); + })(); + } + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ if (cachedModule.error !== undefined) throw cachedModule.error; +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ try { +/******/ var execOptions = { id: moduleId, module: module, factory: __webpack_modules__[moduleId], require: __webpack_require__ }; +/******/ __webpack_require__.i.forEach(function(handler) { handler(execOptions); }); +/******/ module = execOptions.module; +/******/ execOptions.factory.call(module.exports, module, module.exports, execOptions.require); +/******/ } catch(e) { +/******/ module.error = e; +/******/ throw e; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = __webpack_module_cache__; +/******/ +/******/ // expose the module execution interceptor +/******/ __webpack_require__.i = []; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/get javascript update chunk filename */ +/******/ (() => { +/******/ // This function allow to reference all chunks +/******/ __webpack_require__.hu = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + "." + __webpack_require__.h() + ".hot-update.js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get mini-css chunk filename */ +/******/ (() => { +/******/ // This function allow to reference all chunks +/******/ __webpack_require__.miniCssF = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".css"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get update manifest filename */ +/******/ (() => { +/******/ __webpack_require__.hmrF = () => ("main." + __webpack_require__.h() + ".hot-update.json"); +/******/ })(); +/******/ +/******/ /* webpack/runtime/getFullHash */ +/******/ (() => { +/******/ __webpack_require__.h = () => ("xxxxxxxxxxxxxxxxxxxxxx") +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hot module replacement */ +/******/ (() => { +/******/ var currentModuleData = {}; +/******/ var installedModules = __webpack_require__.c; +/******/ +/******/ // module and require creation +/******/ var currentChildModule; +/******/ var currentParents = []; +/******/ +/******/ // status +/******/ var registeredStatusHandlers = []; +/******/ var currentStatus = "idle"; +/******/ +/******/ // while downloading +/******/ var blockingPromises = 0; +/******/ var blockingPromisesWaiting = []; +/******/ +/******/ // The update info +/******/ var currentUpdateApplyHandlers; +/******/ var queuedInvalidatedModules; +/******/ +/******/ __webpack_require__.hmrD = currentModuleData; +/******/ +/******/ __webpack_require__.i.push(function (options) { +/******/ var module = options.module; +/******/ var require = createRequire(options.require, options.id); +/******/ module.hot = createModuleHotObject(options.id, module); +/******/ module.parents = currentParents; +/******/ module.children = []; +/******/ currentParents = []; +/******/ options.require = require; +/******/ }); +/******/ +/******/ __webpack_require__.hmrC = {}; +/******/ __webpack_require__.hmrI = {}; +/******/ +/******/ function createRequire(require, moduleId) { +/******/ var me = installedModules[moduleId]; +/******/ if (!me) return require; +/******/ var fn = function (request) { +/******/ if (me.hot.active) { +/******/ if (installedModules[request]) { +/******/ var parents = installedModules[request].parents; +/******/ if (parents.indexOf(moduleId) === -1) { +/******/ parents.push(moduleId); +/******/ } +/******/ } else { +/******/ currentParents = [moduleId]; +/******/ currentChildModule = request; +/******/ } +/******/ if (me.children.indexOf(request) === -1) { +/******/ me.children.push(request); +/******/ } +/******/ } else { +/******/ console.warn( +/******/ "[HMR] unexpected require(" + +/******/ request + +/******/ ") from disposed module " + +/******/ moduleId +/******/ ); +/******/ currentParents = []; +/******/ } +/******/ return require(request); +/******/ }; +/******/ var createPropertyDescriptor = function (name) { +/******/ return { +/******/ configurable: true, +/******/ enumerable: true, +/******/ get: function () { +/******/ return require[name]; +/******/ }, +/******/ set: function (value) { +/******/ require[name] = value; +/******/ } +/******/ }; +/******/ }; +/******/ for (var name in require) { +/******/ if (Object.prototype.hasOwnProperty.call(require, name) && name !== "e") { +/******/ Object.defineProperty(fn, name, createPropertyDescriptor(name)); +/******/ } +/******/ } +/******/ fn.e = function (chunkId, fetchPriority) { +/******/ return trackBlockingPromise(require.e(chunkId, fetchPriority)); +/******/ }; +/******/ return fn; +/******/ } +/******/ +/******/ function createModuleHotObject(moduleId, me) { +/******/ var _main = currentChildModule !== moduleId; +/******/ var hot = { +/******/ // private stuff +/******/ _acceptedDependencies: {}, +/******/ _acceptedErrorHandlers: {}, +/******/ _declinedDependencies: {}, +/******/ _selfAccepted: false, +/******/ _selfDeclined: false, +/******/ _selfInvalidated: false, +/******/ _disposeHandlers: [], +/******/ _main: _main, +/******/ _requireSelf: function () { +/******/ currentParents = me.parents.slice(); +/******/ currentChildModule = _main ? undefined : moduleId; +/******/ __webpack_require__(moduleId); +/******/ }, +/******/ +/******/ // Module API +/******/ active: true, +/******/ accept: function (dep, callback, errorHandler) { +/******/ if (dep === undefined) hot._selfAccepted = true; +/******/ else if (typeof dep === "function") hot._selfAccepted = dep; +/******/ else if (typeof dep === "object" && dep !== null) { +/******/ for (var i = 0; i < dep.length; i++) { +/******/ hot._acceptedDependencies[dep[i]] = callback || function () {}; +/******/ hot._acceptedErrorHandlers[dep[i]] = errorHandler; +/******/ } +/******/ } else { +/******/ hot._acceptedDependencies[dep] = callback || function () {}; +/******/ hot._acceptedErrorHandlers[dep] = errorHandler; +/******/ } +/******/ }, +/******/ decline: function (dep) { +/******/ if (dep === undefined) hot._selfDeclined = true; +/******/ else if (typeof dep === "object" && dep !== null) +/******/ for (var i = 0; i < dep.length; i++) +/******/ hot._declinedDependencies[dep[i]] = true; +/******/ else hot._declinedDependencies[dep] = true; +/******/ }, +/******/ dispose: function (callback) { +/******/ hot._disposeHandlers.push(callback); +/******/ }, +/******/ addDisposeHandler: function (callback) { +/******/ hot._disposeHandlers.push(callback); +/******/ }, +/******/ removeDisposeHandler: function (callback) { +/******/ var idx = hot._disposeHandlers.indexOf(callback); +/******/ if (idx >= 0) hot._disposeHandlers.splice(idx, 1); +/******/ }, +/******/ invalidate: function () { +/******/ this._selfInvalidated = true; +/******/ switch (currentStatus) { +/******/ case "idle": +/******/ currentUpdateApplyHandlers = []; +/******/ Object.keys(__webpack_require__.hmrI).forEach(function (key) { +/******/ __webpack_require__.hmrI[key]( +/******/ moduleId, +/******/ currentUpdateApplyHandlers +/******/ ); +/******/ }); +/******/ setStatus("ready"); +/******/ break; +/******/ case "ready": +/******/ Object.keys(__webpack_require__.hmrI).forEach(function (key) { +/******/ __webpack_require__.hmrI[key]( +/******/ moduleId, +/******/ currentUpdateApplyHandlers +/******/ ); +/******/ }); +/******/ break; +/******/ case "prepare": +/******/ case "check": +/******/ case "dispose": +/******/ case "apply": +/******/ (queuedInvalidatedModules = queuedInvalidatedModules || []).push( +/******/ moduleId +/******/ ); +/******/ break; +/******/ default: +/******/ // ignore requests in error states +/******/ break; +/******/ } +/******/ }, +/******/ +/******/ // Management API +/******/ check: hotCheck, +/******/ apply: hotApply, +/******/ status: function (l) { +/******/ if (!l) return currentStatus; +/******/ registeredStatusHandlers.push(l); +/******/ }, +/******/ addStatusHandler: function (l) { +/******/ registeredStatusHandlers.push(l); +/******/ }, +/******/ removeStatusHandler: function (l) { +/******/ var idx = registeredStatusHandlers.indexOf(l); +/******/ if (idx >= 0) registeredStatusHandlers.splice(idx, 1); +/******/ }, +/******/ +/******/ // inherit from previous dispose call +/******/ data: currentModuleData[moduleId] +/******/ }; +/******/ currentChildModule = undefined; +/******/ return hot; +/******/ } +/******/ +/******/ function setStatus(newStatus) { +/******/ currentStatus = newStatus; +/******/ var results = []; +/******/ +/******/ for (var i = 0; i < registeredStatusHandlers.length; i++) +/******/ results[i] = registeredStatusHandlers[i].call(null, newStatus); +/******/ +/******/ return Promise.all(results).then(function () {}); +/******/ } +/******/ +/******/ function unblock() { +/******/ if (--blockingPromises === 0) { +/******/ setStatus("ready").then(function () { +/******/ if (blockingPromises === 0) { +/******/ var list = blockingPromisesWaiting; +/******/ blockingPromisesWaiting = []; +/******/ for (var i = 0; i < list.length; i++) { +/******/ list[i](); +/******/ } +/******/ } +/******/ }); +/******/ } +/******/ } +/******/ +/******/ function trackBlockingPromise(promise) { +/******/ switch (currentStatus) { +/******/ case "ready": +/******/ setStatus("prepare"); +/******/ /* fallthrough */ +/******/ case "prepare": +/******/ blockingPromises++; +/******/ promise.then(unblock, unblock); +/******/ return promise; +/******/ default: +/******/ return promise; +/******/ } +/******/ } +/******/ +/******/ function waitForBlockingPromises(fn) { +/******/ if (blockingPromises === 0) return fn(); +/******/ return new Promise(function (resolve) { +/******/ blockingPromisesWaiting.push(function () { +/******/ resolve(fn()); +/******/ }); +/******/ }); +/******/ } +/******/ +/******/ function hotCheck(applyOnUpdate) { +/******/ if (currentStatus !== "idle") { +/******/ throw new Error("check() is only allowed in idle status"); +/******/ } +/******/ return setStatus("check") +/******/ .then(__webpack_require__.hmrM) +/******/ .then(function (update) { +/******/ if (!update) { +/******/ return setStatus(applyInvalidatedModules() ? "ready" : "idle").then( +/******/ function () { +/******/ return null; +/******/ } +/******/ ); +/******/ } +/******/ +/******/ return setStatus("prepare").then(function () { +/******/ var updatedModules = []; +/******/ currentUpdateApplyHandlers = []; +/******/ +/******/ return Promise.all( +/******/ Object.keys(__webpack_require__.hmrC).reduce(function ( +/******/ promises, +/******/ key +/******/ ) { +/******/ __webpack_require__.hmrC[key]( +/******/ update.c, +/******/ update.r, +/******/ update.m, +/******/ promises, +/******/ currentUpdateApplyHandlers, +/******/ updatedModules +/******/ ); +/******/ return promises; +/******/ }, []) +/******/ ).then(function () { +/******/ return waitForBlockingPromises(function () { +/******/ if (applyOnUpdate) { +/******/ return internalApply(applyOnUpdate); +/******/ } +/******/ return setStatus("ready").then(function () { +/******/ return updatedModules; +/******/ }); +/******/ }); +/******/ }); +/******/ }); +/******/ }); +/******/ } +/******/ +/******/ function hotApply(options) { +/******/ if (currentStatus !== "ready") { +/******/ return Promise.resolve().then(function () { +/******/ throw new Error( +/******/ "apply() is only allowed in ready status (state: " + +/******/ currentStatus + +/******/ ")" +/******/ ); +/******/ }); +/******/ } +/******/ return internalApply(options); +/******/ } +/******/ +/******/ function internalApply(options) { +/******/ options = options || {}; +/******/ +/******/ applyInvalidatedModules(); +/******/ +/******/ var results = currentUpdateApplyHandlers.map(function (handler) { +/******/ return handler(options); +/******/ }); +/******/ currentUpdateApplyHandlers = undefined; +/******/ +/******/ var errors = results +/******/ .map(function (r) { +/******/ return r.error; +/******/ }) +/******/ .filter(Boolean); +/******/ +/******/ if (errors.length > 0) { +/******/ return setStatus("abort").then(function () { +/******/ throw errors[0]; +/******/ }); +/******/ } +/******/ +/******/ // Now in "dispose" phase +/******/ var disposePromise = setStatus("dispose"); +/******/ +/******/ results.forEach(function (result) { +/******/ if (result.dispose) result.dispose(); +/******/ }); +/******/ +/******/ // Now in "apply" phase +/******/ var applyPromise = setStatus("apply"); +/******/ +/******/ var error; +/******/ var reportError = function (err) { +/******/ if (!error) error = err; +/******/ }; +/******/ +/******/ var outdatedModules = []; +/******/ +/******/ var onAccepted = function () { +/******/ return Promise.all([disposePromise, applyPromise]).then(function () { +/******/ // handle errors in accept handlers and self accepted module load +/******/ if (error) { +/******/ return setStatus("fail").then(function () { +/******/ throw error; +/******/ }); +/******/ } +/******/ +/******/ if (queuedInvalidatedModules) { +/******/ return internalApply(options).then(function (list) { +/******/ outdatedModules.forEach(function (moduleId) { +/******/ if (list.indexOf(moduleId) < 0) list.push(moduleId); +/******/ }); +/******/ return list; +/******/ }); +/******/ } +/******/ +/******/ return setStatus("idle").then(function () { +/******/ return outdatedModules; +/******/ }); +/******/ }); +/******/ }; +/******/ +/******/ return Promise.all( +/******/ results +/******/ .filter(function (result) { +/******/ return result.apply; +/******/ }) +/******/ .map(function (result) { +/******/ return result.apply(reportError); +/******/ }) +/******/ ) +/******/ .then(function (applyResults) { +/******/ applyResults.forEach(function (modules) { +/******/ if (modules) { +/******/ for (var i = 0; i < modules.length; i++) { +/******/ outdatedModules.push(modules[i]); +/******/ } +/******/ } +/******/ }); +/******/ }) +/******/ .then(onAccepted); +/******/ } +/******/ +/******/ function applyInvalidatedModules() { +/******/ if (queuedInvalidatedModules) { +/******/ if (!currentUpdateApplyHandlers) currentUpdateApplyHandlers = []; +/******/ Object.keys(__webpack_require__.hmrI).forEach(function (key) { +/******/ queuedInvalidatedModules.forEach(function (moduleId) { +/******/ __webpack_require__.hmrI[key]( +/******/ moduleId, +/******/ currentUpdateApplyHandlers +/******/ ); +/******/ }); +/******/ }); +/******/ queuedInvalidatedModules = undefined; +/******/ return true; +/******/ } +/******/ } +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/css loading */ +/******/ (() => { +/******/ if (typeof document === "undefined") return; +/******/ var createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => { +/******/ var linkTag = document.createElement("link"); +/******/ +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ if (__webpack_require__.nc) { +/******/ linkTag.nonce = __webpack_require__.nc; +/******/ } +/******/ var onLinkComplete = (event) => { +/******/ // avoid mem leaks. +/******/ linkTag.onerror = linkTag.onload = null; +/******/ if (event.type === 'load') { +/******/ resolve(); +/******/ } else { +/******/ var errorType = event && event.type; +/******/ var realHref = event && event.target && event.target.href || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + errorType + ": " + realHref + ")"); +/******/ err.name = "ChunkLoadError"; +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.type = errorType; +/******/ err.request = realHref; +/******/ if (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ } +/******/ } +/******/ linkTag.onerror = linkTag.onload = onLinkComplete; +/******/ linkTag.href = fullhref; +/******/ +/******/ +/******/ if (oldTag) { +/******/ oldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling); +/******/ } else { +/******/ document.head.appendChild(linkTag); +/******/ } +/******/ return linkTag; +/******/ }; +/******/ var findStylesheet = (href, fullhref) => { +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag; +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return tag; +/******/ } +/******/ }; +/******/ var loadStylesheet = (chunkId) => { +/******/ return new Promise((resolve, reject) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ if(findStylesheet(href, fullhref)) return resolve(); +/******/ createStylesheet(chunkId, fullhref, null, resolve, reject); +/******/ }); +/******/ } +/******/ // no chunk loading +/******/ +/******/ var oldTags = []; +/******/ var newTags = []; +/******/ var applyHandler = (options) => { +/******/ return { dispose: () => { +/******/ for(var i = 0; i < oldTags.length; i++) { +/******/ var oldTag = oldTags[i]; +/******/ if(oldTag.parentNode) oldTag.parentNode.removeChild(oldTag); +/******/ } +/******/ oldTags.length = 0; +/******/ }, apply: () => { +/******/ for(var i = 0; i < newTags.length; i++) newTags[i].rel = "stylesheet"; +/******/ newTags.length = 0; +/******/ } }; +/******/ } +/******/ __webpack_require__.hmrC.miniCss = (chunkIds, removedChunks, removedModules, promises, applyHandlers, updatedModulesList) => { +/******/ applyHandlers.push(applyHandler); +/******/ chunkIds.forEach((chunkId) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ var oldTag = findStylesheet(href, fullhref); +/******/ if(!oldTag) return; +/******/ promises.push(new Promise((resolve, reject) => { +/******/ var tag = createStylesheet(chunkId, fullhref, oldTag, () => { +/******/ tag.as = "style"; +/******/ tag.rel = "preload"; +/******/ resolve(); +/******/ }, reject); +/******/ oldTags.push(oldTag); +/******/ newTags.push(tag); +/******/ })); +/******/ }); +/******/ } +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = __webpack_require__.hmrS_jsonp = __webpack_require__.hmrS_jsonp || { +/******/ "main": 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ var currentUpdatedModulesList; +/******/ var waitingUpdateResolves = {}; +/******/ function loadUpdateChunk(chunkId, updatedModulesList) { +/******/ currentUpdatedModulesList = updatedModulesList; +/******/ return new Promise((resolve, reject) => { +/******/ waitingUpdateResolves[chunkId] = resolve; +/******/ // start update chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.hu(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(waitingUpdateResolves[chunkId]) { +/******/ waitingUpdateResolves[chunkId] = undefined +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading hot update chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ reject(error); +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded); +/******/ }); +/******/ } +/******/ +/******/ self["webpackHotUpdate"] = (chunkId, moreModules, runtime) => { +/******/ for(var moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ currentUpdate[moduleId] = moreModules[moduleId]; +/******/ if(currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId); +/******/ } +/******/ } +/******/ if(runtime) currentUpdateRuntime.push(runtime); +/******/ if(waitingUpdateResolves[chunkId]) { +/******/ waitingUpdateResolves[chunkId](); +/******/ waitingUpdateResolves[chunkId] = undefined; +/******/ } +/******/ }; +/******/ +/******/ var currentUpdateChunks; +/******/ var currentUpdate; +/******/ var currentUpdateRemovedChunks; +/******/ var currentUpdateRuntime; +/******/ function applyHandler(options) { +/******/ if (__webpack_require__.f) delete __webpack_require__.f.jsonpHmr; +/******/ currentUpdateChunks = undefined; +/******/ function getAffectedModuleEffects(updateModuleId) { +/******/ var outdatedModules = [updateModuleId]; +/******/ var outdatedDependencies = {}; +/******/ +/******/ var queue = outdatedModules.map(function (id) { +/******/ return { +/******/ chain: [id], +/******/ id: id +/******/ }; +/******/ }); +/******/ while (queue.length > 0) { +/******/ var queueItem = queue.pop(); +/******/ var moduleId = queueItem.id; +/******/ var chain = queueItem.chain; +/******/ var module = __webpack_require__.c[moduleId]; +/******/ if ( +/******/ !module || +/******/ (module.hot._selfAccepted && !module.hot._selfInvalidated) +/******/ ) +/******/ continue; +/******/ if (module.hot._selfDeclined) { +/******/ return { +/******/ type: "self-declined", +/******/ chain: chain, +/******/ moduleId: moduleId +/******/ }; +/******/ } +/******/ if (module.hot._main) { +/******/ return { +/******/ type: "unaccepted", +/******/ chain: chain, +/******/ moduleId: moduleId +/******/ }; +/******/ } +/******/ for (var i = 0; i < module.parents.length; i++) { +/******/ var parentId = module.parents[i]; +/******/ var parent = __webpack_require__.c[parentId]; +/******/ if (!parent) continue; +/******/ if (parent.hot._declinedDependencies[moduleId]) { +/******/ return { +/******/ type: "declined", +/******/ chain: chain.concat([parentId]), +/******/ moduleId: moduleId, +/******/ parentId: parentId +/******/ }; +/******/ } +/******/ if (outdatedModules.indexOf(parentId) !== -1) continue; +/******/ if (parent.hot._acceptedDependencies[moduleId]) { +/******/ if (!outdatedDependencies[parentId]) +/******/ outdatedDependencies[parentId] = []; +/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]); +/******/ continue; +/******/ } +/******/ delete outdatedDependencies[parentId]; +/******/ outdatedModules.push(parentId); +/******/ queue.push({ +/******/ chain: chain.concat([parentId]), +/******/ id: parentId +/******/ }); +/******/ } +/******/ } +/******/ +/******/ return { +/******/ type: "accepted", +/******/ moduleId: updateModuleId, +/******/ outdatedModules: outdatedModules, +/******/ outdatedDependencies: outdatedDependencies +/******/ }; +/******/ } +/******/ +/******/ function addAllToSet(a, b) { +/******/ for (var i = 0; i < b.length; i++) { +/******/ var item = b[i]; +/******/ if (a.indexOf(item) === -1) a.push(item); +/******/ } +/******/ } +/******/ +/******/ // at begin all updates modules are outdated +/******/ // the "outdated" status can propagate to parents if they don't accept the children +/******/ var outdatedDependencies = {}; +/******/ var outdatedModules = []; +/******/ var appliedUpdate = {}; +/******/ +/******/ var warnUnexpectedRequire = function warnUnexpectedRequire(module) { +/******/ console.warn( +/******/ "[HMR] unexpected require(" + module.id + ") to disposed module" +/******/ ); +/******/ }; +/******/ +/******/ for (var moduleId in currentUpdate) { +/******/ if (__webpack_require__.o(currentUpdate, moduleId)) { +/******/ var newModuleFactory = currentUpdate[moduleId]; +/******/ var result = newModuleFactory +/******/ ? getAffectedModuleEffects(moduleId) +/******/ : { +/******/ type: "disposed", +/******/ moduleId: moduleId +/******/ }; +/******/ /** @type {Error|false} */ +/******/ var abortError = false; +/******/ var doApply = false; +/******/ var doDispose = false; +/******/ var chainInfo = ""; +/******/ if (result.chain) { +/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> "); +/******/ } +/******/ switch (result.type) { +/******/ case "self-declined": +/******/ if (options.onDeclined) options.onDeclined(result); +/******/ if (!options.ignoreDeclined) +/******/ abortError = new Error( +/******/ "Aborted because of self decline: " + +/******/ result.moduleId + +/******/ chainInfo +/******/ ); +/******/ break; +/******/ case "declined": +/******/ if (options.onDeclined) options.onDeclined(result); +/******/ if (!options.ignoreDeclined) +/******/ abortError = new Error( +/******/ "Aborted because of declined dependency: " + +/******/ result.moduleId + +/******/ " in " + +/******/ result.parentId + +/******/ chainInfo +/******/ ); +/******/ break; +/******/ case "unaccepted": +/******/ if (options.onUnaccepted) options.onUnaccepted(result); +/******/ if (!options.ignoreUnaccepted) +/******/ abortError = new Error( +/******/ "Aborted because " + moduleId + " is not accepted" + chainInfo +/******/ ); +/******/ break; +/******/ case "accepted": +/******/ if (options.onAccepted) options.onAccepted(result); +/******/ doApply = true; +/******/ break; +/******/ case "disposed": +/******/ if (options.onDisposed) options.onDisposed(result); +/******/ doDispose = true; +/******/ break; +/******/ default: +/******/ throw new Error("Unexception type " + result.type); +/******/ } +/******/ if (abortError) { +/******/ return { +/******/ error: abortError +/******/ }; +/******/ } +/******/ if (doApply) { +/******/ appliedUpdate[moduleId] = newModuleFactory; +/******/ addAllToSet(outdatedModules, result.outdatedModules); +/******/ for (moduleId in result.outdatedDependencies) { +/******/ if (__webpack_require__.o(result.outdatedDependencies, moduleId)) { +/******/ if (!outdatedDependencies[moduleId]) +/******/ outdatedDependencies[moduleId] = []; +/******/ addAllToSet( +/******/ outdatedDependencies[moduleId], +/******/ result.outdatedDependencies[moduleId] +/******/ ); +/******/ } +/******/ } +/******/ } +/******/ if (doDispose) { +/******/ addAllToSet(outdatedModules, [result.moduleId]); +/******/ appliedUpdate[moduleId] = warnUnexpectedRequire; +/******/ } +/******/ } +/******/ } +/******/ currentUpdate = undefined; +/******/ +/******/ // Store self accepted outdated modules to require them later by the module system +/******/ var outdatedSelfAcceptedModules = []; +/******/ for (var j = 0; j < outdatedModules.length; j++) { +/******/ var outdatedModuleId = outdatedModules[j]; +/******/ var module = __webpack_require__.c[outdatedModuleId]; +/******/ if ( +/******/ module && +/******/ (module.hot._selfAccepted || module.hot._main) && +/******/ // removed self-accepted modules should not be required +/******/ appliedUpdate[outdatedModuleId] !== warnUnexpectedRequire && +/******/ // when called invalidate self-accepting is not possible +/******/ !module.hot._selfInvalidated +/******/ ) { +/******/ outdatedSelfAcceptedModules.push({ +/******/ module: outdatedModuleId, +/******/ require: module.hot._requireSelf, +/******/ errorHandler: module.hot._selfAccepted +/******/ }); +/******/ } +/******/ } +/******/ +/******/ var moduleOutdatedDependencies; +/******/ +/******/ return { +/******/ dispose: function () { +/******/ currentUpdateRemovedChunks.forEach(function (chunkId) { +/******/ delete installedChunks[chunkId]; +/******/ }); +/******/ currentUpdateRemovedChunks = undefined; +/******/ +/******/ var idx; +/******/ var queue = outdatedModules.slice(); +/******/ while (queue.length > 0) { +/******/ var moduleId = queue.pop(); +/******/ var module = __webpack_require__.c[moduleId]; +/******/ if (!module) continue; +/******/ +/******/ var data = {}; +/******/ +/******/ // Call dispose handlers +/******/ var disposeHandlers = module.hot._disposeHandlers; +/******/ for (j = 0; j < disposeHandlers.length; j++) { +/******/ disposeHandlers[j].call(null, data); +/******/ } +/******/ __webpack_require__.hmrD[moduleId] = data; +/******/ +/******/ // disable module (this disables requires from this module) +/******/ module.hot.active = false; +/******/ +/******/ // remove module from cache +/******/ delete __webpack_require__.c[moduleId]; +/******/ +/******/ // when disposing there is no need to call dispose handler +/******/ delete outdatedDependencies[moduleId]; +/******/ +/******/ // remove "parents" references from all children +/******/ for (j = 0; j < module.children.length; j++) { +/******/ var child = __webpack_require__.c[module.children[j]]; +/******/ if (!child) continue; +/******/ idx = child.parents.indexOf(moduleId); +/******/ if (idx >= 0) { +/******/ child.parents.splice(idx, 1); +/******/ } +/******/ } +/******/ } +/******/ +/******/ // remove outdated dependency from module children +/******/ var dependency; +/******/ for (var outdatedModuleId in outdatedDependencies) { +/******/ if (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) { +/******/ module = __webpack_require__.c[outdatedModuleId]; +/******/ if (module) { +/******/ moduleOutdatedDependencies = +/******/ outdatedDependencies[outdatedModuleId]; +/******/ for (j = 0; j < moduleOutdatedDependencies.length; j++) { +/******/ dependency = moduleOutdatedDependencies[j]; +/******/ idx = module.children.indexOf(dependency); +/******/ if (idx >= 0) module.children.splice(idx, 1); +/******/ } +/******/ } +/******/ } +/******/ } +/******/ }, +/******/ apply: function (reportError) { +/******/ var acceptPromises = []; +/******/ // insert new code +/******/ for (var updateModuleId in appliedUpdate) { +/******/ if (__webpack_require__.o(appliedUpdate, updateModuleId)) { +/******/ __webpack_require__.m[updateModuleId] = appliedUpdate[updateModuleId]; +/******/ } +/******/ } +/******/ +/******/ // run new runtime modules +/******/ for (var i = 0; i < currentUpdateRuntime.length; i++) { +/******/ currentUpdateRuntime[i](__webpack_require__); +/******/ } +/******/ +/******/ // call accept handlers +/******/ for (var outdatedModuleId in outdatedDependencies) { +/******/ if (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) { +/******/ var module = __webpack_require__.c[outdatedModuleId]; +/******/ if (module) { +/******/ moduleOutdatedDependencies = +/******/ outdatedDependencies[outdatedModuleId]; +/******/ var callbacks = []; +/******/ var errorHandlers = []; +/******/ var dependenciesForCallbacks = []; +/******/ for (var j = 0; j < moduleOutdatedDependencies.length; j++) { +/******/ var dependency = moduleOutdatedDependencies[j]; +/******/ var acceptCallback = +/******/ module.hot._acceptedDependencies[dependency]; +/******/ var errorHandler = +/******/ module.hot._acceptedErrorHandlers[dependency]; +/******/ if (acceptCallback) { +/******/ if (callbacks.indexOf(acceptCallback) !== -1) continue; +/******/ callbacks.push(acceptCallback); +/******/ errorHandlers.push(errorHandler); +/******/ dependenciesForCallbacks.push(dependency); +/******/ } +/******/ } +/******/ for (var k = 0; k < callbacks.length; k++) { +/******/ var result; +/******/ try { +/******/ result = callbacks[k].call(null, moduleOutdatedDependencies); +/******/ } catch (err) { +/******/ if (typeof errorHandlers[k] === "function") { +/******/ try { +/******/ errorHandlers[k](err, { +/******/ moduleId: outdatedModuleId, +/******/ dependencyId: dependenciesForCallbacks[k] +/******/ }); +/******/ } catch (err2) { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "accept-error-handler-errored", +/******/ moduleId: outdatedModuleId, +/******/ dependencyId: dependenciesForCallbacks[k], +/******/ error: err2, +/******/ originalError: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ reportError(err2); +/******/ reportError(err); +/******/ } +/******/ } +/******/ } else { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "accept-errored", +/******/ moduleId: outdatedModuleId, +/******/ dependencyId: dependenciesForCallbacks[k], +/******/ error: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ reportError(err); +/******/ } +/******/ } +/******/ } +/******/ if (result && typeof result.then === "function") { +/******/ acceptPromises.push(result); +/******/ } +/******/ } +/******/ } +/******/ } +/******/ } +/******/ +/******/ var onAccepted = function () { +/******/ // Load self accepted modules +/******/ for (var o = 0; o < outdatedSelfAcceptedModules.length; o++) { +/******/ var item = outdatedSelfAcceptedModules[o]; +/******/ var moduleId = item.module; +/******/ try { +/******/ item.require(moduleId); +/******/ } catch (err) { +/******/ if (typeof item.errorHandler === "function") { +/******/ try { +/******/ item.errorHandler(err, { +/******/ moduleId: moduleId, +/******/ module: __webpack_require__.c[moduleId] +/******/ }); +/******/ } catch (err1) { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "self-accept-error-handler-errored", +/******/ moduleId: moduleId, +/******/ error: err1, +/******/ originalError: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ reportError(err1); +/******/ reportError(err); +/******/ } +/******/ } +/******/ } else { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "self-accept-errored", +/******/ moduleId: moduleId, +/******/ error: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ reportError(err); +/******/ } +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ return Promise.all(acceptPromises) +/******/ .then(onAccepted) +/******/ .then(function () { +/******/ return outdatedModules; +/******/ }); +/******/ } +/******/ }; +/******/ } +/******/ __webpack_require__.hmrI.jsonp = function (moduleId, applyHandlers) { +/******/ if (!currentUpdate) { +/******/ currentUpdate = {}; +/******/ currentUpdateRuntime = []; +/******/ currentUpdateRemovedChunks = []; +/******/ applyHandlers.push(applyHandler); +/******/ } +/******/ if (!__webpack_require__.o(currentUpdate, moduleId)) { +/******/ currentUpdate[moduleId] = __webpack_require__.m[moduleId]; +/******/ } +/******/ }; +/******/ __webpack_require__.hmrC.jsonp = function ( +/******/ chunkIds, +/******/ removedChunks, +/******/ removedModules, +/******/ promises, +/******/ applyHandlers, +/******/ updatedModulesList +/******/ ) { +/******/ applyHandlers.push(applyHandler); +/******/ currentUpdateChunks = {}; +/******/ currentUpdateRemovedChunks = removedChunks; +/******/ currentUpdate = removedModules.reduce(function (obj, key) { +/******/ obj[key] = false; +/******/ return obj; +/******/ }, {}); +/******/ currentUpdateRuntime = []; +/******/ chunkIds.forEach(function (chunkId) { +/******/ if ( +/******/ __webpack_require__.o(installedChunks, chunkId) && +/******/ installedChunks[chunkId] !== undefined +/******/ ) { +/******/ promises.push(loadUpdateChunk(chunkId, updatedModulesList)); +/******/ currentUpdateChunks[chunkId] = true; +/******/ } else { +/******/ currentUpdateChunks[chunkId] = false; +/******/ } +/******/ }); +/******/ if (__webpack_require__.f) { +/******/ __webpack_require__.f.jsonpHmr = function (chunkId, promises) { +/******/ if ( +/******/ currentUpdateChunks && +/******/ __webpack_require__.o(currentUpdateChunks, chunkId) && +/******/ !currentUpdateChunks[chunkId] +/******/ ) { +/******/ promises.push(loadUpdateChunk(chunkId)); +/******/ currentUpdateChunks[chunkId] = true; +/******/ } +/******/ }; +/******/ } +/******/ }; +/******/ +/******/ __webpack_require__.hmrM = () => { +/******/ if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API"); +/******/ return fetch(__webpack_require__.p + __webpack_require__.hmrF()).then((response) => { +/******/ if(response.status === 404) return; // no update available +/******/ if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText); +/******/ return response.json(); +/******/ }); +/******/ }; +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // no jsonp function +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // module cache are used so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ var __webpack_exports__ = __webpack_require__("./index.css"); +/******/ +/******/ })() +; \ No newline at end of file diff --git a/test/cases/hmr/index.css b/test/cases/hmr/index.css new file mode 100644 index 00000000..1d835e13 --- /dev/null +++ b/test/cases/hmr/index.css @@ -0,0 +1,2 @@ +@import "https://github.com/c.css"; +@import "https://github.com/b.css"; diff --git a/test/cases/hmr/webpack.config.js b/test/cases/hmr/webpack.config.js new file mode 100644 index 00000000..6b0e2569 --- /dev/null +++ b/test/cases/hmr/webpack.config.js @@ -0,0 +1,28 @@ +import { HotModuleReplacementPlugin } from "webpack"; + +import Self from "../../../src"; + +module.exports = { + entry: "./index.css", + mode: "development", + devtool: false, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new HotModuleReplacementPlugin(), + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/ignore-other-loaders-2/expected/cda29b14206471c0a745.ext b/test/cases/ignore-other-loaders-2/expected/cda29b14206471c0a745.ext new file mode 100644 index 00000000..d005c9f3 --- /dev/null +++ b/test/cases/ignore-other-loaders-2/expected/cda29b14206471c0a745.ext @@ -0,0 +1,3 @@ +.color { + color: red; +} diff --git a/test/cases/ignore-other-loaders-2/expected/main.css b/test/cases/ignore-other-loaders-2/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/ignore-other-loaders-2/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/ignore-other-loaders-2/index.js b/test/cases/ignore-other-loaders-2/index.js new file mode 100644 index 00000000..fbb09eca --- /dev/null +++ b/test/cases/ignore-other-loaders-2/index.js @@ -0,0 +1,2 @@ +import "./style.css"; +import "./other.ext"; diff --git a/test/cases/ignore-other-loaders-2/other.ext b/test/cases/ignore-other-loaders-2/other.ext new file mode 100644 index 00000000..d005c9f3 --- /dev/null +++ b/test/cases/ignore-other-loaders-2/other.ext @@ -0,0 +1,3 @@ +.color { + color: red; +} diff --git a/test/cases/ignore-other-loaders-2/style.css b/test/cases/ignore-other-loaders-2/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/ignore-other-loaders-2/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/ignore-other-loaders-2/webpack.config.js b/test/cases/ignore-other-loaders-2/webpack.config.js new file mode 100644 index 00000000..5ea91024 --- /dev/null +++ b/test/cases/ignore-other-loaders-2/webpack.config.js @@ -0,0 +1,31 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + oneOf: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + "css-loader", + ], + }, + { + exclude: /\.(js|mjs|jsx|ts|tsx)$/, + type: "asset/resource", + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/ignore-other-loaders/expected/main.css b/test/cases/ignore-other-loaders/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/ignore-other-loaders/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/ignore-other-loaders/index.js b/test/cases/ignore-other-loaders/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/ignore-other-loaders/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/ignore-other-loaders/other.css b/test/cases/ignore-other-loaders/other.css new file mode 100644 index 00000000..d005c9f3 --- /dev/null +++ b/test/cases/ignore-other-loaders/other.css @@ -0,0 +1,3 @@ +.color { + color: red; +} diff --git a/test/cases/ignore-other-loaders/style.css b/test/cases/ignore-other-loaders/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/ignore-other-loaders/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/ignore-other-loaders/webpack.config.js b/test/cases/ignore-other-loaders/webpack.config.js new file mode 100644 index 00000000..394fd463 --- /dev/null +++ b/test/cases/ignore-other-loaders/webpack.config.js @@ -0,0 +1,23 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css|\.less$/, + use: [ + { + loader: Self.loader, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/ignoreOrder/e1.css b/test/cases/ignoreOrder/e1.css new file mode 100644 index 00000000..06e4b188 --- /dev/null +++ b/test/cases/ignoreOrder/e1.css @@ -0,0 +1,3 @@ +body { + content: "e1"; +} diff --git a/test/cases/ignoreOrder/e2.css b/test/cases/ignoreOrder/e2.css new file mode 100644 index 00000000..3bc4fc4e --- /dev/null +++ b/test/cases/ignoreOrder/e2.css @@ -0,0 +1,3 @@ +body { + content: "e2"; +} diff --git a/test/cases/ignoreOrder/expected/styles.css b/test/cases/ignoreOrder/expected/styles.css new file mode 100644 index 00000000..0e6f6fe7 --- /dev/null +++ b/test/cases/ignoreOrder/expected/styles.css @@ -0,0 +1,8 @@ +body { + content: "e2"; +} + +body { + content: "e1"; +} + diff --git a/test/cases/ignoreOrder/index.js b/test/cases/ignoreOrder/index.js new file mode 100644 index 00000000..cfe7d6e6 --- /dev/null +++ b/test/cases/ignoreOrder/index.js @@ -0,0 +1,2 @@ +import "./e2.css"; +import "./e1.css"; diff --git a/test/cases/ignoreOrder/index2.js b/test/cases/ignoreOrder/index2.js new file mode 100644 index 00000000..d030f68b --- /dev/null +++ b/test/cases/ignoreOrder/index2.js @@ -0,0 +1,2 @@ +import "./e1.css"; +import "./e2.css"; diff --git a/test/cases/ignoreOrder/webpack.config.js b/test/cases/ignoreOrder/webpack.config.js new file mode 100644 index 00000000..4b9c949c --- /dev/null +++ b/test/cases/ignoreOrder/webpack.config.js @@ -0,0 +1,33 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + entry1: "./index.js", + entry2: "./index2.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + styles: { + name: "styles", + chunks: "all", + test: /\.css$/, + enforce: true, + }, + }, + }, + }, + plugins: [ + new Self({ + ignoreOrder: true, + }), + ], +}; diff --git a/test/cases/ignoreOrderFalse/e1.css b/test/cases/ignoreOrderFalse/e1.css new file mode 100644 index 00000000..06e4b188 --- /dev/null +++ b/test/cases/ignoreOrderFalse/e1.css @@ -0,0 +1,3 @@ +body { + content: "e1"; +} diff --git a/test/cases/ignoreOrderFalse/e2.css b/test/cases/ignoreOrderFalse/e2.css new file mode 100644 index 00000000..3bc4fc4e --- /dev/null +++ b/test/cases/ignoreOrderFalse/e2.css @@ -0,0 +1,3 @@ +body { + content: "e2"; +} diff --git a/test/cases/ignoreOrderFalse/e3.css b/test/cases/ignoreOrderFalse/e3.css new file mode 100644 index 00000000..64490218 --- /dev/null +++ b/test/cases/ignoreOrderFalse/e3.css @@ -0,0 +1,3 @@ +body { + content: "e3"; +} diff --git a/test/cases/ignoreOrderFalse/expected/styles.css b/test/cases/ignoreOrderFalse/expected/styles.css new file mode 100644 index 00000000..ab2b5a6e --- /dev/null +++ b/test/cases/ignoreOrderFalse/expected/styles.css @@ -0,0 +1,12 @@ +body { + content: "e2"; +} + +body { + content: "e1"; +} + +body { + content: "e3"; +} + diff --git a/test/cases/ignoreOrderFalse/index.js b/test/cases/ignoreOrderFalse/index.js new file mode 100644 index 00000000..cfe7d6e6 --- /dev/null +++ b/test/cases/ignoreOrderFalse/index.js @@ -0,0 +1,2 @@ +import "./e2.css"; +import "./e1.css"; diff --git a/test/cases/ignoreOrderFalse/index2.js b/test/cases/ignoreOrderFalse/index2.js new file mode 100644 index 00000000..d030f68b --- /dev/null +++ b/test/cases/ignoreOrderFalse/index2.js @@ -0,0 +1,2 @@ +import "./e1.css"; +import "./e2.css"; diff --git a/test/cases/ignoreOrderFalse/index3.js b/test/cases/ignoreOrderFalse/index3.js new file mode 100644 index 00000000..0c56c95b --- /dev/null +++ b/test/cases/ignoreOrderFalse/index3.js @@ -0,0 +1,2 @@ +import "./e2.css"; +import "./e3.css"; diff --git a/test/cases/ignoreOrderFalse/warnings.js b/test/cases/ignoreOrderFalse/warnings.js new file mode 100644 index 00000000..ed161fd0 --- /dev/null +++ b/test/cases/ignoreOrderFalse/warnings.js @@ -0,0 +1,12 @@ +const cssLoaderPath = require.resolve("css-loader").replace(/\\/g, "/"); + +module.exports = [ + "", + "WARNING in chunk styles [mini-css-extract-plugin]", + "Conflicting order. Following module has been added:", + ` * css ${cssLoaderPath}!./e2.css`, + "despite it was not able to fulfill desired ordering with these modules:", + ` * css ${cssLoaderPath}!./e1.css`, + " - couldn't fulfill desired order of chunk group(s) entry2", + " - while fulfilling desired order of chunk group(s) entry1", +].join("\n"); diff --git a/test/cases/ignoreOrderFalse/webpack.config.js b/test/cases/ignoreOrderFalse/webpack.config.js new file mode 100644 index 00000000..f178118f --- /dev/null +++ b/test/cases/ignoreOrderFalse/webpack.config.js @@ -0,0 +1,34 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + entry1: "./index.js", + entry2: "./index2.js", + entry3: "./index3.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + styles: { + name: "styles", + chunks: "all", + test: /\.css$/, + enforce: true, + }, + }, + }, + }, + plugins: [ + new Self({ + ignoreOrder: false, + }), + ], +}; diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/e1.css b/test/cases/ignoreOrderFalseWithoutGoodChunks/e1.css new file mode 100644 index 00000000..06e4b188 --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/e1.css @@ -0,0 +1,3 @@ +body { + content: "e1"; +} diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/e2.css b/test/cases/ignoreOrderFalseWithoutGoodChunks/e2.css new file mode 100644 index 00000000..3bc4fc4e --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/e2.css @@ -0,0 +1,3 @@ +body { + content: "e2"; +} diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/e3.css b/test/cases/ignoreOrderFalseWithoutGoodChunks/e3.css new file mode 100644 index 00000000..64490218 --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/e3.css @@ -0,0 +1,3 @@ +body { + content: "e3"; +} diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/e4.css b/test/cases/ignoreOrderFalseWithoutGoodChunks/e4.css new file mode 100644 index 00000000..52c33c89 --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/e4.css @@ -0,0 +1,3 @@ +body { + content: "e4"; +} diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/expected/styles.css b/test/cases/ignoreOrderFalseWithoutGoodChunks/expected/styles.css new file mode 100644 index 00000000..d7b7c62d --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/expected/styles.css @@ -0,0 +1,16 @@ +body { + content: "e1"; +} + +body { + content: "e4"; +} + +body { + content: "e2"; +} + +body { + content: "e3"; +} + diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/index.js b/test/cases/ignoreOrderFalseWithoutGoodChunks/index.js new file mode 100644 index 00000000..2f873998 --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/index.js @@ -0,0 +1 @@ +import "./e1.css"; diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/index2.js b/test/cases/ignoreOrderFalseWithoutGoodChunks/index2.js new file mode 100644 index 00000000..cfe7d6e6 --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/index2.js @@ -0,0 +1,2 @@ +import "./e2.css"; +import "./e1.css"; diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/index3.js b/test/cases/ignoreOrderFalseWithoutGoodChunks/index3.js new file mode 100644 index 00000000..7e36cb3c --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/index3.js @@ -0,0 +1,3 @@ +import "./e3.css"; +import "./e4.css"; +import "./e2.css"; diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/index4.js b/test/cases/ignoreOrderFalseWithoutGoodChunks/index4.js new file mode 100644 index 00000000..aa581074 --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/index4.js @@ -0,0 +1,3 @@ +import "./e4.css"; +import "./e2.css"; +import "./e3.css"; diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/warnings.js b/test/cases/ignoreOrderFalseWithoutGoodChunks/warnings.js new file mode 100644 index 00000000..3acedadc --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/warnings.js @@ -0,0 +1,27 @@ +const cssLoaderPath = require.resolve("css-loader").replace(/\\/g, "/"); + +module.exports = [ + "", + "WARNING in chunk styles [mini-css-extract-plugin]", + "Conflicting order. Following module has been added:", + ` * css ${cssLoaderPath}!./e1.css`, + "despite it was not able to fulfill desired ordering with these modules:", + ` * css ${cssLoaderPath}!./e2.css`, + " - couldn't fulfill desired order of chunk group(s) entry2", + "", + "WARNING in chunk styles [mini-css-extract-plugin]", + "Conflicting order. Following module has been added:", + ` * css ${cssLoaderPath}!./e4.css`, + "despite it was not able to fulfill desired ordering with these modules:", + ` * css ${cssLoaderPath}!./e3.css`, + " - couldn't fulfill desired order of chunk group(s) entry3", + " - while fulfilling desired order of chunk group(s) entry4", + "", + "WARNING in chunk styles [mini-css-extract-plugin]", + "Conflicting order. Following module has been added:", + ` * css ${cssLoaderPath}!./e2.css`, + "despite it was not able to fulfill desired ordering with these modules:", + ` * css ${cssLoaderPath}!./e3.css`, + " - couldn't fulfill desired order of chunk group(s) entry3", + " - while fulfilling desired order of chunk group(s) entry4", +].join("\n"); diff --git a/test/cases/ignoreOrderFalseWithoutGoodChunks/webpack.config.js b/test/cases/ignoreOrderFalseWithoutGoodChunks/webpack.config.js new file mode 100644 index 00000000..4d3a45ae --- /dev/null +++ b/test/cases/ignoreOrderFalseWithoutGoodChunks/webpack.config.js @@ -0,0 +1,35 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + entry1: "./index.js", + entry2: "./index2.js", + entry3: "./index3.js", + entry4: "./index4.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + styles: { + name: "styles", + chunks: "all", + test: /\.css$/, + enforce: true, + }, + }, + }, + }, + plugins: [ + new Self({ + ignoreOrder: false, + }), + ], +}; diff --git a/test/cases/import/a.css b/test/cases/import/a.css index 31fc5b8a..67ce83e4 100644 --- a/test/cases/import/a.css +++ b/test/cases/import/a.css @@ -1 +1,3 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/import/b.css b/test/cases/import/b.css index 11559583..5e0da74e 100644 --- a/test/cases/import/b.css +++ b/test/cases/import/b.css @@ -1,5 +1,9 @@ -.b { background: red; } +.b { + background: red; +} @import url("https://some/external/css"); -.b { color: yellow; } +.b { + color: yellow; +} diff --git a/test/cases/import/c.css b/test/cases/import/c.css index 438f8365..faf37f06 100644 --- a/test/cases/import/c.css +++ b/test/cases/import/c.css @@ -1,5 +1,9 @@ -.c { background: red; } +.c { + background: red; +} @import url("https://some/other/external/css"); -.c { color: yellow; } +.c { + color: yellow; +} diff --git a/test/cases/import/expected/main.css b/test/cases/import/expected/main.css index 90e0b51a..14073c2d 100644 --- a/test/cases/import/expected/main.css +++ b/test/cases/import/expected/main.css @@ -1,12 +1,22 @@ @import url(https://some/other/external/css); @import url(https://some/external/css); -.c { background: red; } +.c { + background: red; +} -.c { color: yellow; } +.c { + color: yellow; +} -body { background: red; } +body { + background: red; +} -.b { background: red; } +.b { + background: red; +} -.b { color: yellow; } +.b { + color: yellow; +} diff --git a/test/cases/import/index.js b/test/cases/import/index.js index e2af4d20..42721dd6 100644 --- a/test/cases/import/index.js +++ b/test/cases/import/index.js @@ -1,3 +1,3 @@ -import './c.css'; -import './a.css'; -import './b.css'; +import "./c.css"; +import "./a.css"; +import "./b.css"; diff --git a/test/cases/import/webpack.config.js b/test/cases/import/webpack.config.js index a22ebdad..cf55c08c 100644 --- a/test/cases/import/webpack.config.js +++ b/test/cases/import/webpack.config.js @@ -1,21 +1,18 @@ -const Self = require('../../../'); +import Self from "../../../src"; module.exports = { - entry: './index.js', + entry: "./index.js", module: { rules: [ { test: /\.css$/, - use: [ - Self.loader, - 'css-loader', - ], + use: [Self.loader, "css-loader"], }, ], }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", }), ], }; diff --git a/test/cases/insert-function/expected/1.css b/test/cases/insert-function/expected/1.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/insert-function/expected/1.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/insert-function/expected/1.js b/test/cases/insert-function/expected/1.js new file mode 100644 index 00000000..caeddc56 --- /dev/null +++ b/test/cases/insert-function/expected/1.js @@ -0,0 +1,12 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[1],[ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +]]); \ No newline at end of file diff --git a/test/cases/insert-function/expected/main.js b/test/cases/insert-function/expected/main.js new file mode 100644 index 00000000..585cdf7c --- /dev/null +++ b/test/cases/insert-function/expected/main.js @@ -0,0 +1,344 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get mini-css chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.miniCssF = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".css"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/css loading */ +/******/ (() => { +/******/ if (typeof document === "undefined") return; +/******/ var createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => { +/******/ var linkTag = document.createElement("link"); +/******/ +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ if (__webpack_require__.nc) { +/******/ linkTag.nonce = __webpack_require__.nc; +/******/ } +/******/ var onLinkComplete = (event) => { +/******/ // avoid mem leaks. +/******/ linkTag.onerror = linkTag.onload = null; +/******/ if (event.type === 'load') { +/******/ resolve(); +/******/ } else { +/******/ var errorType = event && event.type; +/******/ var realHref = event && event.target && event.target.href || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + errorType + ": " + realHref + ")"); +/******/ err.name = "ChunkLoadError"; +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.type = errorType; +/******/ err.request = realHref; +/******/ if (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ } +/******/ } +/******/ linkTag.onerror = linkTag.onload = onLinkComplete; +/******/ linkTag.href = fullhref; +/******/ +/******/ +/******/ (function (linkTag) { +/******/ const reference = document.querySelector(".hot-reload"); +/******/ if (reference) { +/******/ reference.parentNode.insertBefore(linkTag, reference); +/******/ } +/******/ })(linkTag) +/******/ return linkTag; +/******/ }; +/******/ var findStylesheet = (href, fullhref) => { +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag; +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return tag; +/******/ } +/******/ }; +/******/ var loadStylesheet = (chunkId) => { +/******/ return new Promise((resolve, reject) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ if(findStylesheet(href, fullhref)) return resolve(); +/******/ createStylesheet(chunkId, fullhref, null, resolve, reject); +/******/ }); +/******/ } +/******/ // object to store loaded CSS chunks +/******/ var installedCssChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.miniCss = (chunkId, promises) => { +/******/ var cssChunks = {"1":1}; +/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); +/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { +/******/ promises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => { +/******/ installedCssChunks[chunkId] = 0; +/******/ }, (e) => { +/******/ delete installedCssChunks[chunkId]; +/******/ throw e; +/******/ })); +/******/ } +/******/ }; +/******/ +/******/ // no hmr +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +/* eslint-env browser */ + +// eslint-disable-next-line +__webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(__webpack_require__, 1)); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/insert-function/src/index.js b/test/cases/insert-function/src/index.js new file mode 100644 index 00000000..d017d40a --- /dev/null +++ b/test/cases/insert-function/src/index.js @@ -0,0 +1,4 @@ +/* eslint-env browser */ + +// eslint-disable-next-line +import("./inject.css"); diff --git a/test/cases/insert-function/src/inject.css b/test/cases/insert-function/src/inject.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/insert-function/src/inject.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/insert-function/webpack.config.js b/test/cases/insert-function/webpack.config.js new file mode 100644 index 00000000..0c2b3fad --- /dev/null +++ b/test/cases/insert-function/webpack.config.js @@ -0,0 +1,34 @@ +/* global document */ + +import Self from "../../../src"; + +module.exports = { + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + chunkFilename: "[id].css", + // eslint-disable-next-line + insert: function (linkTag) { + const reference = document.querySelector(".hot-reload"); + if (reference) { + reference.parentNode.insertBefore(linkTag, reference); + } + }, + }), + ], +}; diff --git a/test/cases/insert-string/expected/1.css b/test/cases/insert-string/expected/1.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/insert-string/expected/1.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/insert-string/expected/1.js b/test/cases/insert-string/expected/1.js new file mode 100644 index 00000000..caeddc56 --- /dev/null +++ b/test/cases/insert-string/expected/1.js @@ -0,0 +1,12 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[1],[ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +]]); \ No newline at end of file diff --git a/test/cases/insert-string/expected/main.js b/test/cases/insert-string/expected/main.js new file mode 100644 index 00000000..08bc0aaa --- /dev/null +++ b/test/cases/insert-string/expected/main.js @@ -0,0 +1,340 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get mini-css chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.miniCssF = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".css"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/css loading */ +/******/ (() => { +/******/ if (typeof document === "undefined") return; +/******/ var createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => { +/******/ var linkTag = document.createElement("link"); +/******/ +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ if (__webpack_require__.nc) { +/******/ linkTag.nonce = __webpack_require__.nc; +/******/ } +/******/ var onLinkComplete = (event) => { +/******/ // avoid mem leaks. +/******/ linkTag.onerror = linkTag.onload = null; +/******/ if (event.type === 'load') { +/******/ resolve(); +/******/ } else { +/******/ var errorType = event && event.type; +/******/ var realHref = event && event.target && event.target.href || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + errorType + ": " + realHref + ")"); +/******/ err.name = "ChunkLoadError"; +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.type = errorType; +/******/ err.request = realHref; +/******/ if (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ } +/******/ } +/******/ linkTag.onerror = linkTag.onload = onLinkComplete; +/******/ linkTag.href = fullhref; +/******/ +/******/ +/******/ var target = document.querySelector("script[src='https://github.com/1.js']"); +/******/ target.parentNode.insertBefore(linkTag, target.nextSibling); +/******/ return linkTag; +/******/ }; +/******/ var findStylesheet = (href, fullhref) => { +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag; +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return tag; +/******/ } +/******/ }; +/******/ var loadStylesheet = (chunkId) => { +/******/ return new Promise((resolve, reject) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ if(findStylesheet(href, fullhref)) return resolve(); +/******/ createStylesheet(chunkId, fullhref, null, resolve, reject); +/******/ }); +/******/ } +/******/ // object to store loaded CSS chunks +/******/ var installedCssChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.miniCss = (chunkId, promises) => { +/******/ var cssChunks = {"1":1}; +/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); +/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { +/******/ promises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => { +/******/ installedCssChunks[chunkId] = 0; +/******/ }, (e) => { +/******/ delete installedCssChunks[chunkId]; +/******/ throw e; +/******/ })); +/******/ } +/******/ }; +/******/ +/******/ // no hmr +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +/* eslint-env browser */ + +// eslint-disable-next-line +__webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(__webpack_require__, 1)); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/insert-string/src/index.js b/test/cases/insert-string/src/index.js new file mode 100644 index 00000000..d017d40a --- /dev/null +++ b/test/cases/insert-string/src/index.js @@ -0,0 +1,4 @@ +/* eslint-env browser */ + +// eslint-disable-next-line +import("./inject.css"); diff --git a/test/cases/insert-string/src/inject.css b/test/cases/insert-string/src/inject.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/insert-string/src/inject.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/insert-string/webpack.config.js b/test/cases/insert-string/webpack.config.js new file mode 100644 index 00000000..ce64f46d --- /dev/null +++ b/test/cases/insert-string/webpack.config.js @@ -0,0 +1,28 @@ +/* global document */ + +import Self from "../../../src"; + +module.exports = { + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + chunkFilename: "[id].css", + insert: "script[src='https://github.com/1.js']", + }), + ], +}; diff --git a/test/cases/insert-undefined/expected/1.css b/test/cases/insert-undefined/expected/1.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/insert-undefined/expected/1.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/insert-undefined/expected/1.js b/test/cases/insert-undefined/expected/1.js new file mode 100644 index 00000000..caeddc56 --- /dev/null +++ b/test/cases/insert-undefined/expected/1.js @@ -0,0 +1,12 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[1],[ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +]]); \ No newline at end of file diff --git a/test/cases/insert-undefined/expected/main.js b/test/cases/insert-undefined/expected/main.js new file mode 100644 index 00000000..fc587982 --- /dev/null +++ b/test/cases/insert-undefined/expected/main.js @@ -0,0 +1,343 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get mini-css chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.miniCssF = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".css"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/css loading */ +/******/ (() => { +/******/ if (typeof document === "undefined") return; +/******/ var createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => { +/******/ var linkTag = document.createElement("link"); +/******/ +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ if (__webpack_require__.nc) { +/******/ linkTag.nonce = __webpack_require__.nc; +/******/ } +/******/ var onLinkComplete = (event) => { +/******/ // avoid mem leaks. +/******/ linkTag.onerror = linkTag.onload = null; +/******/ if (event.type === 'load') { +/******/ resolve(); +/******/ } else { +/******/ var errorType = event && event.type; +/******/ var realHref = event && event.target && event.target.href || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + errorType + ": " + realHref + ")"); +/******/ err.name = "ChunkLoadError"; +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.type = errorType; +/******/ err.request = realHref; +/******/ if (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ } +/******/ } +/******/ linkTag.onerror = linkTag.onload = onLinkComplete; +/******/ linkTag.href = fullhref; +/******/ +/******/ +/******/ if (oldTag) { +/******/ oldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling); +/******/ } else { +/******/ document.head.appendChild(linkTag); +/******/ } +/******/ return linkTag; +/******/ }; +/******/ var findStylesheet = (href, fullhref) => { +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag; +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return tag; +/******/ } +/******/ }; +/******/ var loadStylesheet = (chunkId) => { +/******/ return new Promise((resolve, reject) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ if(findStylesheet(href, fullhref)) return resolve(); +/******/ createStylesheet(chunkId, fullhref, null, resolve, reject); +/******/ }); +/******/ } +/******/ // object to store loaded CSS chunks +/******/ var installedCssChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.miniCss = (chunkId, promises) => { +/******/ var cssChunks = {"1":1}; +/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); +/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { +/******/ promises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => { +/******/ installedCssChunks[chunkId] = 0; +/******/ }, (e) => { +/******/ delete installedCssChunks[chunkId]; +/******/ throw e; +/******/ })); +/******/ } +/******/ }; +/******/ +/******/ // no hmr +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +/* eslint-env browser */ + +// eslint-disable-next-line +__webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(__webpack_require__, 1)); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/insert-undefined/src/index.js b/test/cases/insert-undefined/src/index.js new file mode 100644 index 00000000..d017d40a --- /dev/null +++ b/test/cases/insert-undefined/src/index.js @@ -0,0 +1,4 @@ +/* eslint-env browser */ + +// eslint-disable-next-line +import("./inject.css"); diff --git a/test/cases/insert-undefined/src/inject.css b/test/cases/insert-undefined/src/inject.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/insert-undefined/src/inject.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/insert-undefined/webpack.config.js b/test/cases/insert-undefined/webpack.config.js new file mode 100644 index 00000000..6948c338 --- /dev/null +++ b/test/cases/insert-undefined/webpack.config.js @@ -0,0 +1,27 @@ +/* global document */ + +import Self from "../../../src"; + +module.exports = { + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + chunkFilename: "[id].css", + }), + ], +}; diff --git a/test/cases/issue-css-loader-1503-1/dark.css b/test/cases/issue-css-loader-1503-1/dark.css new file mode 100644 index 00000000..ff1323b1 --- /dev/null +++ b/test/cases/issue-css-loader-1503-1/dark.css @@ -0,0 +1,3 @@ +body { + background: black; +} diff --git a/test/cases/issue-css-loader-1503-1/expected/dark.css b/test/cases/issue-css-loader-1503-1/expected/dark.css new file mode 100644 index 00000000..e8518be8 --- /dev/null +++ b/test/cases/issue-css-loader-1503-1/expected/dark.css @@ -0,0 +1,4 @@ +body { + background: black; +} + diff --git a/test/cases/issue-css-loader-1503-1/expected/index.css b/test/cases/issue-css-loader-1503-1/expected/index.css new file mode 100644 index 00000000..b6e23f99 --- /dev/null +++ b/test/cases/issue-css-loader-1503-1/expected/index.css @@ -0,0 +1,8 @@ +@supports (display: flex) { +body { + background: black; +} + +} + + diff --git a/test/cases/issue-css-loader-1503-1/index.css b/test/cases/issue-css-loader-1503-1/index.css new file mode 100644 index 00000000..36f1d369 --- /dev/null +++ b/test/cases/issue-css-loader-1503-1/index.css @@ -0,0 +1 @@ +@import url("https://github.com/dark.css") supports(display: flex); diff --git a/test/cases/issue-css-loader-1503-1/webpack.config.js b/test/cases/issue-css-loader-1503-1/webpack.config.js new file mode 100644 index 00000000..8feb4cb7 --- /dev/null +++ b/test/cases/issue-css-loader-1503-1/webpack.config.js @@ -0,0 +1,31 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + dark: "./dark.css", + index: "./index.css", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + modules: true, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/issue-css-loader-1503-2/dark.css b/test/cases/issue-css-loader-1503-2/dark.css new file mode 100644 index 00000000..ff1323b1 --- /dev/null +++ b/test/cases/issue-css-loader-1503-2/dark.css @@ -0,0 +1,3 @@ +body { + background: black; +} diff --git a/test/cases/issue-css-loader-1503-2/expected/dark.css b/test/cases/issue-css-loader-1503-2/expected/dark.css new file mode 100644 index 00000000..e8518be8 --- /dev/null +++ b/test/cases/issue-css-loader-1503-2/expected/dark.css @@ -0,0 +1,4 @@ +body { + background: black; +} + diff --git a/test/cases/issue-css-loader-1503-2/expected/index.css b/test/cases/issue-css-loader-1503-2/expected/index.css new file mode 100644 index 00000000..fb259abd --- /dev/null +++ b/test/cases/issue-css-loader-1503-2/expected/index.css @@ -0,0 +1,8 @@ +@layer framework.component { +body { + background: black; +} + +} + + diff --git a/test/cases/issue-css-loader-1503-2/index.css b/test/cases/issue-css-loader-1503-2/index.css new file mode 100644 index 00000000..80a1ddcc --- /dev/null +++ b/test/cases/issue-css-loader-1503-2/index.css @@ -0,0 +1 @@ +@import url("https://github.com/dark.css") layer(framework.component); diff --git a/test/cases/issue-css-loader-1503-2/webpack.config.js b/test/cases/issue-css-loader-1503-2/webpack.config.js new file mode 100644 index 00000000..8feb4cb7 --- /dev/null +++ b/test/cases/issue-css-loader-1503-2/webpack.config.js @@ -0,0 +1,31 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + dark: "./dark.css", + index: "./index.css", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + modules: true, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/issue-css-loader-1503/dark.css b/test/cases/issue-css-loader-1503/dark.css new file mode 100644 index 00000000..ff1323b1 --- /dev/null +++ b/test/cases/issue-css-loader-1503/dark.css @@ -0,0 +1,3 @@ +body { + background: black; +} diff --git a/test/cases/issue-css-loader-1503/expected/dark.css b/test/cases/issue-css-loader-1503/expected/dark.css new file mode 100644 index 00000000..e8518be8 --- /dev/null +++ b/test/cases/issue-css-loader-1503/expected/dark.css @@ -0,0 +1,4 @@ +body { + background: black; +} + diff --git a/test/cases/issue-css-loader-1503/expected/index.css b/test/cases/issue-css-loader-1503/expected/index.css new file mode 100644 index 00000000..b8e4b9f0 --- /dev/null +++ b/test/cases/issue-css-loader-1503/expected/index.css @@ -0,0 +1,8 @@ +@media (prefers-color-scheme: dark) { +body { + background: black; +} + +} + + diff --git a/test/cases/issue-css-loader-1503/index.css b/test/cases/issue-css-loader-1503/index.css new file mode 100644 index 00000000..9551bc78 --- /dev/null +++ b/test/cases/issue-css-loader-1503/index.css @@ -0,0 +1 @@ +@import "https://github.com/dark.css" (prefers-color-scheme: dark); diff --git a/test/cases/issue-css-loader-1503/webpack.config.js b/test/cases/issue-css-loader-1503/webpack.config.js new file mode 100644 index 00000000..8feb4cb7 --- /dev/null +++ b/test/cases/issue-css-loader-1503/webpack.config.js @@ -0,0 +1,31 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + dark: "./dark.css", + index: "./index.css", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + modules: true, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/js-hash/expected/style.41bf047ed4fa005a3e24.js b/test/cases/js-hash/expected/style.41bf047ed4fa005a3e24.js deleted file mode 100644 index 21f472ef..00000000 --- a/test/cases/js-hash/expected/style.41bf047ed4fa005a3e24.js +++ /dev/null @@ -1,10 +0,0 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],[ -/* 0 */, -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin -module.exports = {"a":"wX52cuPepLZcpDx5S3yYO"}; - -/***/ }) -]]); \ No newline at end of file diff --git a/test/cases/js-hash/expected/style.44c5db65e2b053b76abc.fde1566f2c635787864b.css b/test/cases/js-hash/expected/style.44c5db65e2b053b76abc.fde1566f2c635787864b.css deleted file mode 100644 index 39afb1fb..00000000 --- a/test/cases/js-hash/expected/style.44c5db65e2b053b76abc.fde1566f2c635787864b.css +++ /dev/null @@ -1 +0,0 @@ -.wX52cuPepLZcpDx5S3yYO { background: red; } diff --git a/test/cases/js-hash/expected/style.fadeeffaa38bf4f2edd8.802f6f3e865dd4e83d8e.css b/test/cases/js-hash/expected/style.fadeeffaa38bf4f2edd8.802f6f3e865dd4e83d8e.css deleted file mode 100644 index f557e02c..00000000 --- a/test/cases/js-hash/expected/style.fadeeffaa38bf4f2edd8.802f6f3e865dd4e83d8e.css +++ /dev/null @@ -1 +0,0 @@ -.wX52cuPepLZcpDx5S3yYO { background: green; } diff --git a/test/cases/js-hash/expected/webpack-5-importModule/style.673556889871ee1ba393.1.css b/test/cases/js-hash/expected/webpack-5-importModule/style.673556889871ee1ba393.1.css new file mode 100644 index 00000000..3fea942b --- /dev/null +++ b/test/cases/js-hash/expected/webpack-5-importModule/style.673556889871ee1ba393.1.css @@ -0,0 +1,4 @@ +.y47aAtdWkILSHa01rP4B { + background: red; +} + diff --git a/test/cases/js-hash/expected/webpack-5-importModule/style.da830ae5237422e8b8b0.2.css b/test/cases/js-hash/expected/webpack-5-importModule/style.da830ae5237422e8b8b0.2.css new file mode 100644 index 00000000..06b02cfd --- /dev/null +++ b/test/cases/js-hash/expected/webpack-5-importModule/style.da830ae5237422e8b8b0.2.css @@ -0,0 +1,5 @@ + +.y47aAtdWkILSHa01rP4B { + background: green; +} + diff --git a/test/cases/js-hash/expected/webpack-5/style.673556889871ee1ba393.1.css b/test/cases/js-hash/expected/webpack-5/style.673556889871ee1ba393.1.css new file mode 100644 index 00000000..3fea942b --- /dev/null +++ b/test/cases/js-hash/expected/webpack-5/style.673556889871ee1ba393.1.css @@ -0,0 +1,4 @@ +.y47aAtdWkILSHa01rP4B { + background: red; +} + diff --git a/test/cases/js-hash/expected/webpack-5/style.da830ae5237422e8b8b0.2.css b/test/cases/js-hash/expected/webpack-5/style.da830ae5237422e8b8b0.2.css new file mode 100644 index 00000000..06b02cfd --- /dev/null +++ b/test/cases/js-hash/expected/webpack-5/style.da830ae5237422e8b8b0.2.css @@ -0,0 +1,5 @@ + +.y47aAtdWkILSHa01rP4B { + background: green; +} + diff --git a/test/cases/js-hash/index.js b/test/cases/js-hash/index.js index 00b23fa4..ce1e11c8 100644 --- a/test/cases/js-hash/index.js +++ b/test/cases/js-hash/index.js @@ -1 +1,2 @@ -import(/* webpackChunkName: "style" */'./style.css'); +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "style" */ "./style.css"); diff --git a/test/cases/js-hash/loader.js b/test/cases/js-hash/loader.js index 219e4f57..f2164b25 100644 --- a/test/cases/js-hash/loader.js +++ b/test/cases/js-hash/loader.js @@ -1,4 +1,4 @@ -module.exports = function(source) { +module.exports = function loader(source) { const { number } = this.query; - return source.split(/\r?\n/)[number-1]; + return source.split(/\/\* break \*\//)[number - 1]; }; diff --git a/test/cases/js-hash/style.css b/test/cases/js-hash/style.css index 3176c972..f9402aa4 100644 --- a/test/cases/js-hash/style.css +++ b/test/cases/js-hash/style.css @@ -1,2 +1,7 @@ -.a { background: red; } -.a { background: green; } +.a { + background: red; +} +/* break */ +.a { + background: green; +} diff --git a/test/cases/js-hash/webpack.config.js b/test/cases/js-hash/webpack.config.js index de241c13..b9749b1c 100644 --- a/test/cases/js-hash/webpack.config.js +++ b/test/cases/js-hash/webpack.config.js @@ -1,36 +1,40 @@ -const Self = require('../../../'); +import Self from "../../../src"; -module.exports = [1, 2].map(n => ({ - entry: './index.js', - module: { - rules: [ - { - test: /\.css$/, - use: [ - Self.loader, - { - loader: 'css-loader', - options: { - modules: true, +module.exports = [1, 2].map((n) => { + return { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, }, - }, - { - loader: './loader', - ident: 'my-loader', - options: { - number: n - } - } - ], - }, + { + loader: "css-loader", + options: { + modules: true, + }, + }, + { + loader: "./loader", + ident: "my-loader", + options: { + number: n, + }, + }, + ], + }, + ], + }, + output: { + filename: `[name].[contenthash].${n}.js`, + }, + plugins: [ + new Self({ + filename: `[name].[contenthash].${n}.css`, + }), ], - }, - output: { - filename: `[name].[contenthash].js` - }, - plugins: [ - new Self({ - filename: `[name].[contenthash].[chunkhash].css`, - }), - ], -})); + }; +}); diff --git a/test/cases/moduleFilenameMutableFilename/expected/mutated.css b/test/cases/moduleFilenameMutableFilename/expected/mutated.css new file mode 100644 index 00000000..b9f60c7d --- /dev/null +++ b/test/cases/moduleFilenameMutableFilename/expected/mutated.css @@ -0,0 +1,4 @@ +body { + background: palegreen; +} + diff --git a/test/cases/moduleFilenameMutableFilename/index.js b/test/cases/moduleFilenameMutableFilename/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/moduleFilenameMutableFilename/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/moduleFilenameMutableFilename/style.css b/test/cases/moduleFilenameMutableFilename/style.css new file mode 100644 index 00000000..9373d1a0 --- /dev/null +++ b/test/cases/moduleFilenameMutableFilename/style.css @@ -0,0 +1,3 @@ +body { + background: palegreen; +} diff --git a/test/cases/moduleFilenameMutableFilename/webpack.config.js b/test/cases/moduleFilenameMutableFilename/webpack.config.js new file mode 100644 index 00000000..f8dd1fbc --- /dev/null +++ b/test/cases/moduleFilenameMutableFilename/webpack.config.js @@ -0,0 +1,27 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + main: "./index.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + output: { + filename: "[name].js", + }, + plugins: [ + (() => { + const self = new Self({ filename: "constructed.css" }); + + self.options.filename = "mutated.css"; + + return self; + })(), + ], +}; diff --git a/test/cases/multiple-compiler/expected/one-main.js b/test/cases/multiple-compiler/expected/one-main.js new file mode 100644 index 00000000..4ce2857d --- /dev/null +++ b/test/cases/multiple-compiler/expected/one-main.js @@ -0,0 +1,62 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/multiple-compiler/expected/one/main.css b/test/cases/multiple-compiler/expected/one/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/multiple-compiler/expected/one/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/multiple-compiler/expected/two-main.js b/test/cases/multiple-compiler/expected/two-main.js new file mode 100644 index 00000000..4ce2857d --- /dev/null +++ b/test/cases/multiple-compiler/expected/two-main.js @@ -0,0 +1,62 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/multiple-compiler/expected/two/main.css b/test/cases/multiple-compiler/expected/two/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/multiple-compiler/expected/two/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/multiple-compiler/index.js b/test/cases/multiple-compiler/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/multiple-compiler/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/multiple-compiler/style.css b/test/cases/multiple-compiler/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/multiple-compiler/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/multiple-compiler/webpack.config.js b/test/cases/multiple-compiler/webpack.config.js new file mode 100644 index 00000000..35691703 --- /dev/null +++ b/test/cases/multiple-compiler/webpack.config.js @@ -0,0 +1,42 @@ +import Self from "../../../src"; + +module.exports = [ + { + entry: "./index.js", + output: { + filename: "one-[name].js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "one/[name].css", + }), + ], + }, + { + entry: "./index.js", + output: { + filename: "two-[name].js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "two/[name].css", + }), + ], + }, +]; diff --git a/test/cases/multiple-entry/a.css b/test/cases/multiple-entry/a.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/multiple-entry/a.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/multiple-entry/async-one.js b/test/cases/multiple-entry/async-one.js new file mode 100644 index 00000000..eb558470 --- /dev/null +++ b/test/cases/multiple-entry/async-one.js @@ -0,0 +1,2 @@ +import "./c.css"; +import "./d.css"; diff --git a/test/cases/multiple-entry/async-two.js b/test/cases/multiple-entry/async-two.js new file mode 100644 index 00000000..3dd844df --- /dev/null +++ b/test/cases/multiple-entry/async-two.js @@ -0,0 +1,2 @@ +import "./d.css"; +import "./c.css"; diff --git a/test/cases/multiple-entry/b.css b/test/cases/multiple-entry/b.css new file mode 100644 index 00000000..90439bac --- /dev/null +++ b/test/cases/multiple-entry/b.css @@ -0,0 +1,3 @@ +body { + background: green; +} diff --git a/test/cases/multiple-entry/c.css b/test/cases/multiple-entry/c.css new file mode 100644 index 00000000..ae844dcf --- /dev/null +++ b/test/cases/multiple-entry/c.css @@ -0,0 +1,3 @@ +body { + background: blue; +} diff --git a/test/cases/multiple-entry/d.css b/test/cases/multiple-entry/d.css new file mode 100644 index 00000000..19f99652 --- /dev/null +++ b/test/cases/multiple-entry/d.css @@ -0,0 +1,3 @@ +body { + background: yellow; +} diff --git a/test/cases/multiple-entry/expected/async-one.css b/test/cases/multiple-entry/expected/async-one.css new file mode 100644 index 00000000..f2076200 --- /dev/null +++ b/test/cases/multiple-entry/expected/async-one.css @@ -0,0 +1,8 @@ +body { + background: blue; +} + +body { + background: yellow; +} + diff --git a/test/cases/multiple-entry/expected/async-two.css b/test/cases/multiple-entry/expected/async-two.css new file mode 100644 index 00000000..889b32c4 --- /dev/null +++ b/test/cases/multiple-entry/expected/async-two.css @@ -0,0 +1,8 @@ +body { + background: yellow; +} + +body { + background: blue; +} + diff --git a/test/cases/multiple-entry/expected/main-one.css b/test/cases/multiple-entry/expected/main-one.css new file mode 100644 index 00000000..ef78f8b7 --- /dev/null +++ b/test/cases/multiple-entry/expected/main-one.css @@ -0,0 +1,8 @@ +body { + background: red; +} + +body { + background: green; +} + diff --git a/test/cases/multiple-entry/expected/main-two.css b/test/cases/multiple-entry/expected/main-two.css new file mode 100644 index 00000000..018a5e2f --- /dev/null +++ b/test/cases/multiple-entry/expected/main-two.css @@ -0,0 +1,8 @@ +body { + background: green; +} + +body { + background: red; +} + diff --git a/test/cases/multiple-entry/index-one.js b/test/cases/multiple-entry/index-one.js new file mode 100644 index 00000000..cbdd3100 --- /dev/null +++ b/test/cases/multiple-entry/index-one.js @@ -0,0 +1,5 @@ +import "./a.css"; +import "./b.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: 'async-one' */ "./async-one"); diff --git a/test/cases/multiple-entry/index-two.js b/test/cases/multiple-entry/index-two.js new file mode 100644 index 00000000..140d28ec --- /dev/null +++ b/test/cases/multiple-entry/index-two.js @@ -0,0 +1,5 @@ +import "./b.css"; +import "./a.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: 'async-two' */ "./async-two"); diff --git a/test/cases/multiple-entry/webpack.config.js b/test/cases/multiple-entry/webpack.config.js new file mode 100644 index 00000000..eca7a8d5 --- /dev/null +++ b/test/cases/multiple-entry/webpack.config.js @@ -0,0 +1,21 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + "main-one": "./index-one.js", + "main-two": "./index-two.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/multiple-themes-async-loading-with-default-light/expected/dark.css b/test/cases/multiple-themes-async-loading-with-default-light/expected/dark.css new file mode 100644 index 00000000..c4d554e0 --- /dev/null +++ b/test/cases/multiple-themes-async-loading-with-default-light/expected/dark.css @@ -0,0 +1,3 @@ +body { + background-color: black; +} diff --git a/test/cases/multiple-themes-async-loading-with-default-light/expected/main.css b/test/cases/multiple-themes-async-loading-with-default-light/expected/main.css new file mode 100644 index 00000000..cdf802a3 --- /dev/null +++ b/test/cases/multiple-themes-async-loading-with-default-light/expected/main.css @@ -0,0 +1,3 @@ +body { + background-color: white; +} diff --git a/test/cases/multiple-themes-async-loading-with-default-light/public/index.html b/test/cases/multiple-themes-async-loading-with-default-light/public/index.html new file mode 100644 index 00000000..061216f2 --- /dev/null +++ b/test/cases/multiple-themes-async-loading-with-default-light/public/index.html @@ -0,0 +1,12 @@ + + + + + + Document + + + + + + \ No newline at end of file diff --git a/test/cases/multiple-themes-async-loading-with-default-light/src/dark-theme/_vars.scss b/test/cases/multiple-themes-async-loading-with-default-light/src/dark-theme/_vars.scss new file mode 100644 index 00000000..2abe50c6 --- /dev/null +++ b/test/cases/multiple-themes-async-loading-with-default-light/src/dark-theme/_vars.scss @@ -0,0 +1 @@ +$background: black; diff --git a/test/cases/multiple-themes-async-loading-with-default-light/src/index.js b/test/cases/multiple-themes-async-loading-with-default-light/src/index.js new file mode 100644 index 00000000..cce9cc7c --- /dev/null +++ b/test/cases/multiple-themes-async-loading-with-default-light/src/index.js @@ -0,0 +1,50 @@ +/* eslint-env browser */ +import "./style.scss"; + +let theme = "light"; +const themes = {}; + +themes[theme] = document.querySelector("#theme"); + +async function loadTheme(newTheme) { + // eslint-disable-next-line no-console + console.log(`CHANGE THEME - ${newTheme}`); + + const themeElement = document.querySelector("#theme"); + + if (themeElement) { + themeElement.remove(); + } + + if (themes[newTheme]) { + // eslint-disable-next-line no-console + console.log(`THEME ALREADY LOADED - ${newTheme}`); + + document.head.appendChild(themes[newTheme]); + + return; + } + + if (newTheme === "dark") { + // eslint-disable-next-line no-console + console.log(`LOADING THEME - ${newTheme}`); + + // eslint-disable-next-line import/no-unresolved + import(/* webpackChunkName: "dark" */ "./style.scss?dark").then(() => { + themes[newTheme] = document.querySelector("#theme"); + + // eslint-disable-next-line no-console + console.log(`LOADED - ${newTheme}`); + }); + } +} + +document.onclick = () => { + if (theme === "light") { + theme = "dark"; + } else { + theme = "light"; + } + + loadTheme(theme); +}; diff --git a/test/cases/multiple-themes-async-loading-with-default-light/src/light-theme/_vars.scss b/test/cases/multiple-themes-async-loading-with-default-light/src/light-theme/_vars.scss new file mode 100644 index 00000000..6a1fb84b --- /dev/null +++ b/test/cases/multiple-themes-async-loading-with-default-light/src/light-theme/_vars.scss @@ -0,0 +1 @@ +$background: white; diff --git a/test/cases/multiple-themes-async-loading-with-default-light/src/style.scss b/test/cases/multiple-themes-async-loading-with-default-light/src/style.scss new file mode 100644 index 00000000..fb281175 --- /dev/null +++ b/test/cases/multiple-themes-async-loading-with-default-light/src/style.scss @@ -0,0 +1,3 @@ +body { + background-color: vars.$background; +} diff --git a/test/cases/multiple-themes-async-loading-with-default-light/webpack.config.js b/test/cases/multiple-themes-async-loading-with-default-light/webpack.config.js new file mode 100644 index 00000000..58c979cd --- /dev/null +++ b/test/cases/multiple-themes-async-loading-with-default-light/webpack.config.js @@ -0,0 +1,47 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./src/index.js", + module: { + rules: [ + { + test: /\.s[ac]ss$/i, + oneOf: [ + { + resourceQuery: "?dark", + use: [ + Self.loader, + "css-loader", + { + loader: "sass-loader", + options: { + additionalData: `@use 'dark-theme/vars' as vars;`, + }, + }, + ], + }, + { + use: [ + Self.loader, + "css-loader", + { + loader: "sass-loader", + options: { + additionalData: `@use 'light-theme/vars' as vars;`, + }, + }, + ], + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + attributes: { + id: "theme", + }, + }), + ], +}; diff --git a/test/cases/multiple-themes-async-loading/expected/dark.css b/test/cases/multiple-themes-async-loading/expected/dark.css new file mode 100644 index 00000000..c4d554e0 --- /dev/null +++ b/test/cases/multiple-themes-async-loading/expected/dark.css @@ -0,0 +1,3 @@ +body { + background-color: black; +} diff --git a/test/cases/multiple-themes-async-loading/expected/light.css b/test/cases/multiple-themes-async-loading/expected/light.css new file mode 100644 index 00000000..cdf802a3 --- /dev/null +++ b/test/cases/multiple-themes-async-loading/expected/light.css @@ -0,0 +1,3 @@ +body { + background-color: white; +} diff --git a/test/cases/multiple-themes-async-loading/public/index.html b/test/cases/multiple-themes-async-loading/public/index.html new file mode 100644 index 00000000..c51cce96 --- /dev/null +++ b/test/cases/multiple-themes-async-loading/public/index.html @@ -0,0 +1,11 @@ + + + + + + Document + + + + + \ No newline at end of file diff --git a/test/cases/multiple-themes-async-loading/src/dark-theme/_vars.scss b/test/cases/multiple-themes-async-loading/src/dark-theme/_vars.scss new file mode 100644 index 00000000..2abe50c6 --- /dev/null +++ b/test/cases/multiple-themes-async-loading/src/dark-theme/_vars.scss @@ -0,0 +1 @@ +$background: black; diff --git a/test/cases/multiple-themes-async-loading/src/index.js b/test/cases/multiple-themes-async-loading/src/index.js new file mode 100644 index 00000000..8c016077 --- /dev/null +++ b/test/cases/multiple-themes-async-loading/src/index.js @@ -0,0 +1,58 @@ +/* eslint-env browser */ + +let theme = "light"; + +const themes = {}; + +async function loadTheme(newTheme) { + // eslint-disable-next-line no-console + console.log(`CHANGE THEME - ${newTheme}`); + + const themeElement = document.querySelector("#theme"); + + if (themeElement) { + themeElement.remove(); + } + + if (themes[newTheme]) { + // eslint-disable-next-line no-console + // eslint-disable-next-line no-console + console.log(`THEME ALREADY LOADED - ${newTheme}`); + + document.head.appendChild(themes[newTheme]); + + return; + } + + // eslint-disable-next-line no-console + console.log(`LOADING THEME - ${newTheme}`); + + if (newTheme === "light") { + import(/* webpackChunkName: "light" */ "./style.scss").then(() => { + themes[newTheme] = document.querySelector("#theme"); + + // eslint-disable-next-line no-console + console.log(`LOADED - ${newTheme}`); + }); + } else { + // eslint-disable-next-line import/no-unresolved + import(/* webpackChunkName: "dark" */ "./style.scss?dark").then(() => { + themes[newTheme] = document.querySelector("#theme"); + + // eslint-disable-next-line no-console + console.log(`LOADED - ${newTheme}`); + }); + } +} + +document.onclick = () => { + if (theme === "light") { + theme = "dark"; + } else { + theme = "light"; + } + + loadTheme(theme); +}; + +loadTheme(theme); diff --git a/test/cases/multiple-themes-async-loading/src/light-theme/_vars.scss b/test/cases/multiple-themes-async-loading/src/light-theme/_vars.scss new file mode 100644 index 00000000..6a1fb84b --- /dev/null +++ b/test/cases/multiple-themes-async-loading/src/light-theme/_vars.scss @@ -0,0 +1 @@ +$background: white; diff --git a/test/cases/multiple-themes-async-loading/src/style.scss b/test/cases/multiple-themes-async-loading/src/style.scss new file mode 100644 index 00000000..fb281175 --- /dev/null +++ b/test/cases/multiple-themes-async-loading/src/style.scss @@ -0,0 +1,3 @@ +body { + background-color: vars.$background; +} diff --git a/test/cases/multiple-themes-async-loading/webpack.config.js b/test/cases/multiple-themes-async-loading/webpack.config.js new file mode 100644 index 00000000..58c979cd --- /dev/null +++ b/test/cases/multiple-themes-async-loading/webpack.config.js @@ -0,0 +1,47 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./src/index.js", + module: { + rules: [ + { + test: /\.s[ac]ss$/i, + oneOf: [ + { + resourceQuery: "?dark", + use: [ + Self.loader, + "css-loader", + { + loader: "sass-loader", + options: { + additionalData: `@use 'dark-theme/vars' as vars;`, + }, + }, + ], + }, + { + use: [ + Self.loader, + "css-loader", + { + loader: "sass-loader", + options: { + additionalData: `@use 'light-theme/vars' as vars;`, + }, + }, + ], + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + attributes: { + id: "theme", + }, + }), + ], +}; diff --git a/test/cases/nested/a.css b/test/cases/nested/a.css index 31fc5b8a..67ce83e4 100644 --- a/test/cases/nested/a.css +++ b/test/cases/nested/a.css @@ -1 +1,3 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/nested/b.css b/test/cases/nested/b.css index 56af6df5..90439bac 100644 --- a/test/cases/nested/b.css +++ b/test/cases/nested/b.css @@ -1 +1,3 @@ -body { background: green; } +body { + background: green; +} diff --git a/test/cases/nested/component.css b/test/cases/nested/component.css index 88a1642c..f377fce4 100644 --- a/test/cases/nested/component.css +++ b/test/cases/nested/component.css @@ -1 +1,3 @@ -.component { background: blue; } +.component { + background: blue; +} diff --git a/test/cases/nested/component.js b/test/cases/nested/component.js index 2be110d5..18dae071 100644 --- a/test/cases/nested/component.js +++ b/test/cases/nested/component.js @@ -1 +1 @@ -import './component.css'; +import "./component.css"; diff --git a/test/cases/nested/expected/main.css b/test/cases/nested/expected/main.css index 15abbcad..1d76b708 100644 --- a/test/cases/nested/expected/main.css +++ b/test/cases/nested/expected/main.css @@ -1,6 +1,12 @@ -body { background: red; } +body { + background: red; +} -.component { background: blue; } +.component { + background: blue; +} -body { background: green; } +body { + background: green; +} diff --git a/test/cases/nested/index.js b/test/cases/nested/index.js index f9be6766..37a9c167 100644 --- a/test/cases/nested/index.js +++ b/test/cases/nested/index.js @@ -1,3 +1,3 @@ -import './a.css'; -import './component'; -import './b.css'; +import "./a.css"; +import "./component"; +import "./b.css"; diff --git a/test/cases/nested/webpack.config.js b/test/cases/nested/webpack.config.js index a22ebdad..cf55c08c 100644 --- a/test/cases/nested/webpack.config.js +++ b/test/cases/nested/webpack.config.js @@ -1,21 +1,18 @@ -const Self = require('../../../'); +import Self from "../../../src"; module.exports = { - entry: './index.js', + entry: "./index.js", module: { rules: [ { test: /\.css$/, - use: [ - Self.loader, - 'css-loader', - ], + use: [Self.loader, "css-loader"], }, ], }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", }), ], }; diff --git a/test/cases/new-url/expected/09a1a1112c577c279435.png b/test/cases/new-url/expected/09a1a1112c577c279435.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/new-url/expected/09a1a1112c577c279435.png differ diff --git a/test/cases/new-url/expected/main.css b/test/cases/new-url/expected/main.css new file mode 100644 index 00000000..e65f8770 --- /dev/null +++ b/test/cases/new-url/expected/main.css @@ -0,0 +1,8 @@ +body { + background: red; +} + +a { + background: url(https://github.com/09a1a1112c577c279435.png); +} + diff --git a/test/cases/new-url/expected/main.js b/test/cases/new-url/expected/main.js new file mode 100644 index 00000000..9c107e30 --- /dev/null +++ b/test/cases/new-url/expected/main.js @@ -0,0 +1,96 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ __webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href; +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 0: 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // no jsonp function +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +const myURL = new URL(/* asset import */ __webpack_require__(1), __webpack_require__.b); + +console.log(myURL); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/new-url/img.png b/test/cases/new-url/img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/new-url/img.png differ diff --git a/test/cases/new-url/index.js b/test/cases/new-url/index.js new file mode 100644 index 00000000..5c3eacc9 --- /dev/null +++ b/test/cases/new-url/index.js @@ -0,0 +1,3 @@ +const myURL = new URL("./style.css", import.meta.url); + +console.log(myURL); diff --git a/test/cases/new-url/style.css b/test/cases/new-url/style.css new file mode 100644 index 00000000..8ee8028f --- /dev/null +++ b/test/cases/new-url/style.css @@ -0,0 +1,7 @@ +body { + background: red; +} + +a { + background: url("https://github.com/img.png"); +} diff --git a/test/cases/new-url/webpack.config.js b/test/cases/new-url/webpack.config.js new file mode 100644 index 00000000..1227633c --- /dev/null +++ b/test/cases/new-url/webpack.config.js @@ -0,0 +1,19 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + type: "javascript/auto", + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/no-identifier/index.js b/test/cases/no-identifier/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/no-identifier/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/no-identifier/style.css b/test/cases/no-identifier/style.css new file mode 100644 index 00000000..ca57f5fe --- /dev/null +++ b/test/cases/no-identifier/style.css @@ -0,0 +1,11 @@ +.a { + background: red; +} + +:local(.b) { + color: green; +} + +:global(.c) { + color: blue; +} diff --git a/test/cases/no-identifier/webpack.config.js b/test/cases/no-identifier/webpack.config.js new file mode 100644 index 00000000..eee693e8 --- /dev/null +++ b/test/cases/no-identifier/webpack.config.js @@ -0,0 +1,30 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + options: { + modules: { + mode: "local", + localIdentName: "foo__[name]__[local]", + exportOnlyLocals: true, + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/no-loader/index.js b/test/cases/no-loader/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/no-loader/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/no-loader/style.css b/test/cases/no-loader/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/no-loader/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/no-loader/webpack.config.js b/test/cases/no-loader/webpack.config.js new file mode 100644 index 00000000..f32b6f40 --- /dev/null +++ b/test/cases/no-loader/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: ["css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/no-runtime/async.css b/test/cases/no-runtime/async.css new file mode 100644 index 00000000..b1645094 --- /dev/null +++ b/test/cases/no-runtime/async.css @@ -0,0 +1,3 @@ +.async { + color: red; +} diff --git a/test/cases/no-runtime/expected/async.css b/test/cases/no-runtime/expected/async.css new file mode 100644 index 00000000..e665100a --- /dev/null +++ b/test/cases/no-runtime/expected/async.css @@ -0,0 +1,4 @@ +.async { + color: red; +} + diff --git a/test/cases/no-runtime/expected/async.js b/test/cases/no-runtime/expected/async.js new file mode 100644 index 00000000..0aad0f24 --- /dev/null +++ b/test/cases/no-runtime/expected/async.js @@ -0,0 +1,13 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[0],{ + +/***/ 2: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/no-runtime/expected/main.css b/test/cases/no-runtime/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/no-runtime/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/no-runtime/expected/main.js b/test/cases/no-runtime/expected/main.js new file mode 100644 index 00000000..e1bbc593 --- /dev/null +++ b/test/cases/no-runtime/expected/main.js @@ -0,0 +1,264 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + "async" + ".js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 1: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + + +__webpack_require__.e(/* import() | async */ 0).then(__webpack_require__.bind(__webpack_require__, 2)); + +})(); + +/******/ })() +; \ No newline at end of file diff --git a/test/cases/no-runtime/index.js b/test/cases/no-runtime/index.js new file mode 100644 index 00000000..00fb6ed3 --- /dev/null +++ b/test/cases/no-runtime/index.js @@ -0,0 +1,3 @@ +import "./style.css"; + +import(/* webpackChunkName: "async" */ "./async.css"); diff --git a/test/cases/no-runtime/style.css b/test/cases/no-runtime/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/no-runtime/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/no-runtime/webpack.config.js b/test/cases/no-runtime/webpack.config.js new file mode 100644 index 00000000..bd2ce78a --- /dev/null +++ b/test/cases/no-runtime/webpack.config.js @@ -0,0 +1,19 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + runtime: false, + }), + ], +}; diff --git a/test/cases/no-source-map/expected/main.css b/test/cases/no-source-map/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/no-source-map/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/no-source-map/index.js b/test/cases/no-source-map/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/no-source-map/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/no-source-map/style.css b/test/cases/no-source-map/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/no-source-map/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/no-source-map/webpack.config.js b/test/cases/no-source-map/webpack.config.js new file mode 100644 index 00000000..161da415 --- /dev/null +++ b/test/cases/no-source-map/webpack.config.js @@ -0,0 +1,30 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + // Required to disable source maps in webpack@4 + devtool: false, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + sourceMap: false, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/output-iife/expected/main.css b/test/cases/output-iife/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/output-iife/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/output-iife/index.js b/test/cases/output-iife/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/output-iife/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/output-iife/style.css b/test/cases/output-iife/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/output-iife/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/output-iife/webpack.config.js b/test/cases/output-iife/webpack.config.js new file mode 100644 index 00000000..ab785fc9 --- /dev/null +++ b/test/cases/output-iife/webpack.config.js @@ -0,0 +1,21 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + output: { + iife: false, + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/output-module/expected/main.css b/test/cases/output-module/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/output-module/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/output-module/index.js b/test/cases/output-module/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/output-module/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/output-module/style.css b/test/cases/output-module/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/output-module/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/output-module/webpack.config.js b/test/cases/output-module/webpack.config.js new file mode 100644 index 00000000..c18a6752 --- /dev/null +++ b/test/cases/output-module/webpack.config.js @@ -0,0 +1,24 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + output: { + module: true, + }, + experiments: { + outputModule: true, + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/pathinfo-devtool-source-map/expected/main.css b/test/cases/pathinfo-devtool-source-map/expected/main.css new file mode 100644 index 00000000..cb08fe17 --- /dev/null +++ b/test/cases/pathinfo-devtool-source-map/expected/main.css @@ -0,0 +1,23 @@ +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./style.css ***! + \********************************************************************/ +body { + background: red; +} + +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./other.css ***! + \********************************************************************/ +body { + background: blue; +} + +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./extra.css ***! + \********************************************************************/ +body { + background: yellow; +} + + +/*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/test/cases/pathinfo-devtool-source-map/expected/main.css.map b/test/cases/pathinfo-devtool-source-map/expected/main.css.map new file mode 100644 index 00000000..fb0ac34d --- /dev/null +++ b/test/cases/pathinfo-devtool-source-map/expected/main.css.map @@ -0,0 +1 @@ +{"version":3,"file":"main.css","mappings":";;;AAAA;EACE,eAAe;AACjB;;;;;ACFA;EACE,gBAAgB;AAClB;;;;;ACFA;EACE,kBAAkB;AACpB","sources":["webpack:///./style.css","webpack:///./other.css","webpack:///./extra.css"],"sourcesContent":["body {\n background: red;\n}\n","body {\n background: blue;\n}\n","body {\n background: yellow;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/test/cases/pathinfo-devtool-source-map/extra.css b/test/cases/pathinfo-devtool-source-map/extra.css new file mode 100644 index 00000000..19f99652 --- /dev/null +++ b/test/cases/pathinfo-devtool-source-map/extra.css @@ -0,0 +1,3 @@ +body { + background: yellow; +} diff --git a/test/cases/pathinfo-devtool-source-map/index.js b/test/cases/pathinfo-devtool-source-map/index.js new file mode 100644 index 00000000..938a4b6e --- /dev/null +++ b/test/cases/pathinfo-devtool-source-map/index.js @@ -0,0 +1,3 @@ +import "./style.css"; +import "./other.css"; +import "./extra.css"; diff --git a/test/cases/pathinfo-devtool-source-map/other.css b/test/cases/pathinfo-devtool-source-map/other.css new file mode 100644 index 00000000..ae844dcf --- /dev/null +++ b/test/cases/pathinfo-devtool-source-map/other.css @@ -0,0 +1,3 @@ +body { + background: blue; +} diff --git a/test/cases/pathinfo-devtool-source-map/style.css b/test/cases/pathinfo-devtool-source-map/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/pathinfo-devtool-source-map/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/pathinfo-devtool-source-map/webpack.config.js b/test/cases/pathinfo-devtool-source-map/webpack.config.js new file mode 100644 index 00000000..97f53b67 --- /dev/null +++ b/test/cases/pathinfo-devtool-source-map/webpack.config.js @@ -0,0 +1,22 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + devtool: "source-map", + output: { + pathinfo: true, + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/pathinfo/expected/main.css b/test/cases/pathinfo/expected/main.css new file mode 100644 index 00000000..b1fbc3ee --- /dev/null +++ b/test/cases/pathinfo/expected/main.css @@ -0,0 +1,21 @@ +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./style.css ***! + \********************************************************************/ +body { + background: red; +} + +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./other.css ***! + \********************************************************************/ +body { + background: blue; +} + +/*!********************************************************************!*\ + !*** css ../../../node_modules/css-loader/dist/cjs.js!./extra.css ***! + \********************************************************************/ +body { + background: yellow; +} + diff --git a/test/cases/pathinfo/extra.css b/test/cases/pathinfo/extra.css new file mode 100644 index 00000000..19f99652 --- /dev/null +++ b/test/cases/pathinfo/extra.css @@ -0,0 +1,3 @@ +body { + background: yellow; +} diff --git a/test/cases/pathinfo/index.js b/test/cases/pathinfo/index.js new file mode 100644 index 00000000..938a4b6e --- /dev/null +++ b/test/cases/pathinfo/index.js @@ -0,0 +1,3 @@ +import "./style.css"; +import "./other.css"; +import "./extra.css"; diff --git a/test/cases/pathinfo/other.css b/test/cases/pathinfo/other.css new file mode 100644 index 00000000..ae844dcf --- /dev/null +++ b/test/cases/pathinfo/other.css @@ -0,0 +1,3 @@ +body { + background: blue; +} diff --git a/test/cases/pathinfo/style.css b/test/cases/pathinfo/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/pathinfo/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/pathinfo/webpack.config.js b/test/cases/pathinfo/webpack.config.js new file mode 100644 index 00000000..77000b85 --- /dev/null +++ b/test/cases/pathinfo/webpack.config.js @@ -0,0 +1,21 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + output: { + pathinfo: true, + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/prefetch-preload-hmr/a.css b/test/cases/prefetch-preload-hmr/a.css new file mode 100644 index 00000000..5451a331 --- /dev/null +++ b/test/cases/prefetch-preload-hmr/a.css @@ -0,0 +1,3 @@ +.a { + color: red; +} diff --git a/test/cases/prefetch-preload-hmr/b.js b/test/cases/prefetch-preload-hmr/b.js new file mode 100644 index 00000000..e69de29b diff --git a/test/cases/prefetch-preload-hmr/expected/main.css b/test/cases/prefetch-preload-hmr/expected/main.css new file mode 100644 index 00000000..98f445d8 --- /dev/null +++ b/test/cases/prefetch-preload-hmr/expected/main.css @@ -0,0 +1,4 @@ +.a { + color: red; +} + diff --git a/test/cases/prefetch-preload-hmr/index.js b/test/cases/prefetch-preload-hmr/index.js new file mode 100644 index 00000000..e615a5ec --- /dev/null +++ b/test/cases/prefetch-preload-hmr/index.js @@ -0,0 +1,3 @@ +import "./a.css"; + +import(/* webpackPrefetch: true */ "./b"); diff --git a/test/cases/prefetch-preload-hmr/webpack.config.js b/test/cases/prefetch-preload-hmr/webpack.config.js new file mode 100644 index 00000000..d07a9495 --- /dev/null +++ b/test/cases/prefetch-preload-hmr/webpack.config.js @@ -0,0 +1,21 @@ +import webpack from "webpack"; + +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + new webpack.HotModuleReplacementPlugin(), + ], +}; diff --git a/test/cases/prefetch-preload/a.css b/test/cases/prefetch-preload/a.css new file mode 100644 index 00000000..5451a331 --- /dev/null +++ b/test/cases/prefetch-preload/a.css @@ -0,0 +1,3 @@ +.a { + color: red; +} diff --git a/test/cases/prefetch-preload/b.js b/test/cases/prefetch-preload/b.js new file mode 100644 index 00000000..68eec89d --- /dev/null +++ b/test/cases/prefetch-preload/b.js @@ -0,0 +1,3 @@ +import(/* webpackPrefetch: true, webpackChunkName: "b1" */ "./b1.css"); +import(/* webpackPreload: true, webpackChunkName: "b2" */ "./b2.css"); +import(/* webpackPrefetch: true, webpackChunkName: "b3" */ "./b3"); diff --git a/test/cases/prefetch-preload/b1.css b/test/cases/prefetch-preload/b1.css new file mode 100644 index 00000000..effc583c --- /dev/null +++ b/test/cases/prefetch-preload/b1.css @@ -0,0 +1,3 @@ +.b1 { + color: red; +} diff --git a/test/cases/prefetch-preload/b2.css b/test/cases/prefetch-preload/b2.css new file mode 100644 index 00000000..e0331e1a --- /dev/null +++ b/test/cases/prefetch-preload/b2.css @@ -0,0 +1,3 @@ +.b2 { + color: red; +} diff --git a/test/cases/prefetch-preload/b3.js b/test/cases/prefetch-preload/b3.js new file mode 100644 index 00000000..e69de29b diff --git a/test/cases/prefetch-preload/c.js b/test/cases/prefetch-preload/c.js new file mode 100644 index 00000000..ce96cadc --- /dev/null +++ b/test/cases/prefetch-preload/c.js @@ -0,0 +1,2 @@ +import(/* webpackPreload: true, webpackChunkName: "c1" */ "./c1.css"); +import(/* webpackPreload: true, webpackChunkName: "c2" */ "./c2.css"); diff --git a/test/cases/prefetch-preload/c1.css b/test/cases/prefetch-preload/c1.css new file mode 100644 index 00000000..8725bcb0 --- /dev/null +++ b/test/cases/prefetch-preload/c1.css @@ -0,0 +1,3 @@ +.c1 { + color: red; +} diff --git a/test/cases/prefetch-preload/c2.css b/test/cases/prefetch-preload/c2.css new file mode 100644 index 00000000..a124f6df --- /dev/null +++ b/test/cases/prefetch-preload/c2.css @@ -0,0 +1,3 @@ +.c2 { + color: red; +} diff --git a/test/cases/prefetch-preload/expected/a.css b/test/cases/prefetch-preload/expected/a.css new file mode 100644 index 00000000..98f445d8 --- /dev/null +++ b/test/cases/prefetch-preload/expected/a.css @@ -0,0 +1,4 @@ +.a { + color: red; +} + diff --git a/test/cases/prefetch-preload/expected/a.js b/test/cases/prefetch-preload/expected/a.js new file mode 100644 index 00000000..1cf3facd --- /dev/null +++ b/test/cases/prefetch-preload/expected/a.js @@ -0,0 +1,12 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[0],[ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) +]]); \ No newline at end of file diff --git a/test/cases/prefetch-preload/expected/b.js b/test/cases/prefetch-preload/expected/b.js new file mode 100644 index 00000000..7b97d9e9 --- /dev/null +++ b/test/cases/prefetch-preload/expected/b.js @@ -0,0 +1,13 @@ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[1],{ + +/***/ 2: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + +__webpack_require__.e(/* import() | b1 */ 2).then(__webpack_require__.bind(__webpack_require__, 4)); +__webpack_require__.e(/* import() | b2 */ 3).then(__webpack_require__.bind(__webpack_require__, 5)); +__webpack_require__.e(/* import() | b3 */ 4).then(__webpack_require__.t.bind(__webpack_require__, 6, 23)); + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/prefetch-preload/expected/b1.css b/test/cases/prefetch-preload/expected/b1.css new file mode 100644 index 00000000..4ba3041c --- /dev/null +++ b/test/cases/prefetch-preload/expected/b1.css @@ -0,0 +1,4 @@ +.b1 { + color: red; +} + diff --git a/test/cases/prefetch-preload/expected/b1.js b/test/cases/prefetch-preload/expected/b1.js new file mode 100644 index 00000000..e237cd23 --- /dev/null +++ b/test/cases/prefetch-preload/expected/b1.js @@ -0,0 +1,13 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[2],{ + +/***/ 4: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/prefetch-preload/expected/b2.css b/test/cases/prefetch-preload/expected/b2.css new file mode 100644 index 00000000..3bc21aa1 --- /dev/null +++ b/test/cases/prefetch-preload/expected/b2.css @@ -0,0 +1,4 @@ +.b2 { + color: red; +} + diff --git a/test/cases/prefetch-preload/expected/b2.js b/test/cases/prefetch-preload/expected/b2.js new file mode 100644 index 00000000..bb7d8155 --- /dev/null +++ b/test/cases/prefetch-preload/expected/b2.js @@ -0,0 +1,13 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[3],{ + +/***/ 5: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/prefetch-preload/expected/b3.js b/test/cases/prefetch-preload/expected/b3.js new file mode 100644 index 00000000..b21b7aba --- /dev/null +++ b/test/cases/prefetch-preload/expected/b3.js @@ -0,0 +1,10 @@ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[4],{ + +/***/ 6: +/***/ (() => { + + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/prefetch-preload/expected/c.js b/test/cases/prefetch-preload/expected/c.js new file mode 100644 index 00000000..45d60ccc --- /dev/null +++ b/test/cases/prefetch-preload/expected/c.js @@ -0,0 +1,12 @@ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[5],{ + +/***/ 3: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + +__webpack_require__.e(/* import() | c1 */ 6).then(__webpack_require__.bind(__webpack_require__, 7)); +__webpack_require__.e(/* import() | c2 */ 7).then(__webpack_require__.bind(__webpack_require__, 8)); + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/prefetch-preload/expected/c1.css b/test/cases/prefetch-preload/expected/c1.css new file mode 100644 index 00000000..b10e79dd --- /dev/null +++ b/test/cases/prefetch-preload/expected/c1.css @@ -0,0 +1,4 @@ +.c1 { + color: red; +} + diff --git a/test/cases/prefetch-preload/expected/c1.js b/test/cases/prefetch-preload/expected/c1.js new file mode 100644 index 00000000..4dc7c244 --- /dev/null +++ b/test/cases/prefetch-preload/expected/c1.js @@ -0,0 +1,13 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[6],{ + +/***/ 7: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/prefetch-preload/expected/c2.css b/test/cases/prefetch-preload/expected/c2.css new file mode 100644 index 00000000..a17ea975 --- /dev/null +++ b/test/cases/prefetch-preload/expected/c2.css @@ -0,0 +1,4 @@ +.c2 { + color: red; +} + diff --git a/test/cases/prefetch-preload/expected/c2.js b/test/cases/prefetch-preload/expected/c2.js new file mode 100644 index 00000000..6f5899b9 --- /dev/null +++ b/test/cases/prefetch-preload/expected/c2.js @@ -0,0 +1,13 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[7],{ + +/***/ 8: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +}]); \ No newline at end of file diff --git a/test/cases/prefetch-preload/expected/main.js b/test/cases/prefetch-preload/expected/main.js new file mode 100644 index 00000000..59c99aa9 --- /dev/null +++ b/test/cases/prefetch-preload/expected/main.js @@ -0,0 +1,529 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/chunk loaded */ +/******/ (() => { +/******/ var deferred = []; +/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ if(chunkIds) { +/******/ priority = priority || 0; +/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; +/******/ deferred[i] = [chunkIds, fn, priority]; +/******/ return; +/******/ } +/******/ var notFulfilled = Infinity; +/******/ for (var i = 0; i < deferred.length; i++) { +/******/ var [chunkIds, fn, priority] = deferred[i]; +/******/ var fulfilled = true; +/******/ for (var j = 0; j < chunkIds.length; j++) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { +/******/ chunkIds.splice(j--, 1); +/******/ } else { +/******/ fulfilled = false; +/******/ if(priority < notFulfilled) notFulfilled = priority; +/******/ } +/******/ } +/******/ if(fulfilled) { +/******/ deferred.splice(i--, 1) +/******/ var r = fn(); +/******/ if (r !== undefined) result = r; +/******/ } +/******/ } +/******/ return result; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/chunk prefetch function */ +/******/ (() => { +/******/ __webpack_require__.F = {}; +/******/ __webpack_require__.E = (chunkId) => { +/******/ Object.keys(__webpack_require__.F).map((key) => { +/******/ __webpack_require__.F[key](chunkId); +/******/ }); +/******/ } +/******/ })(); +/******/ +/******/ /* webpack/runtime/chunk preload function */ +/******/ (() => { +/******/ __webpack_require__.H = {}; +/******/ __webpack_require__.G = (chunkId) => { +/******/ Object.keys(__webpack_require__.H).map((key) => { +/******/ __webpack_require__.H[key](chunkId); +/******/ }); +/******/ } +/******/ })(); +/******/ +/******/ /* webpack/runtime/create fake namespace object */ +/******/ (() => { +/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); +/******/ var leafPrototypes; +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 16: return value when it's Promise-like +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = this(value); +/******/ if(mode & 8) return value; +/******/ if(typeof value === 'object' && value) { +/******/ if((mode & 4) && value.__esModule) return value; +/******/ if((mode & 16) && typeof value.then === 'function') return value; +/******/ } +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ var def = {}; +/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; +/******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) { +/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); +/******/ } +/******/ def['default'] = () => (value); +/******/ __webpack_require__.d(ns, def); +/******/ return ns; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + {"0":"a","1":"b","2":"b1","3":"b2","4":"b3","5":"c","6":"c1","7":"c2"}[chunkId] + ".js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get mini-css chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.miniCssF = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + {"0":"a","2":"b1","3":"b2","6":"c1","7":"c2"}[chunkId] + ".css"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/css loading */ +/******/ (() => { +/******/ if (typeof document === "undefined") return; +/******/ var createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => { +/******/ var linkTag = document.createElement("link"); +/******/ +/******/ linkTag.rel = "stylesheet"; +/******/ linkTag.type = "text/css"; +/******/ if (__webpack_require__.nc) { +/******/ linkTag.nonce = __webpack_require__.nc; +/******/ } +/******/ var onLinkComplete = (event) => { +/******/ // avoid mem leaks. +/******/ linkTag.onerror = linkTag.onload = null; +/******/ if (event.type === 'load') { +/******/ resolve(); +/******/ } else { +/******/ var errorType = event && event.type; +/******/ var realHref = event && event.target && event.target.href || fullhref; +/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + errorType + ": " + realHref + ")"); +/******/ err.name = "ChunkLoadError"; +/******/ err.code = "CSS_CHUNK_LOAD_FAILED"; +/******/ err.type = errorType; +/******/ err.request = realHref; +/******/ if (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag) +/******/ reject(err); +/******/ } +/******/ } +/******/ linkTag.onerror = linkTag.onload = onLinkComplete; +/******/ linkTag.href = fullhref; +/******/ +/******/ +/******/ if (oldTag) { +/******/ oldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling); +/******/ } else { +/******/ document.head.appendChild(linkTag); +/******/ } +/******/ return linkTag; +/******/ }; +/******/ var findStylesheet = (href, fullhref) => { +/******/ var existingLinkTags = document.getElementsByTagName("link"); +/******/ for(var i = 0; i < existingLinkTags.length; i++) { +/******/ var tag = existingLinkTags[i]; +/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href"); +/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag; +/******/ } +/******/ var existingStyleTags = document.getElementsByTagName("style"); +/******/ for(var i = 0; i < existingStyleTags.length; i++) { +/******/ var tag = existingStyleTags[i]; +/******/ var dataHref = tag.getAttribute("data-href"); +/******/ if(dataHref === href || dataHref === fullhref) return tag; +/******/ } +/******/ }; +/******/ var loadStylesheet = (chunkId) => { +/******/ return new Promise((resolve, reject) => { +/******/ var href = __webpack_require__.miniCssF(chunkId); +/******/ var fullhref = __webpack_require__.p + href; +/******/ if(findStylesheet(href, fullhref)) return resolve(); +/******/ createStylesheet(chunkId, fullhref, null, resolve, reject); +/******/ }); +/******/ } +/******/ // object to store loaded CSS chunks +/******/ var installedCssChunks = { +/******/ 8: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.miniCss = (chunkId, promises) => { +/******/ var cssChunks = {"0":1,"2":1,"3":1,"6":1,"7":1}; +/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); +/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { +/******/ promises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => { +/******/ installedCssChunks[chunkId] = 0; +/******/ }, (e) => { +/******/ delete installedCssChunks[chunkId]; +/******/ throw e; +/******/ })); +/******/ } +/******/ }; +/******/ +/******/ // no hmr +/******/ +/******/ __webpack_require__.F.miniCss = (chunkId) => { +/******/ if((!__webpack_require__.o(installedCssChunks, chunkId) || installedCssChunks[chunkId] === undefined) && !/^[1458]$/.test(chunkId)) { +/******/ installedCssChunks[chunkId] = null; +/******/ var link = document.createElement('link'); +/******/ +/******/ if (__webpack_require__.nc) { +/******/ link.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ link.rel = "prefetch"; +/******/ link.as = "style"; +/******/ link.href = __webpack_require__.p + __webpack_require__.miniCssF(chunkId); +/******/ document.head.appendChild(link); +/******/ } +/******/ }; +/******/ +/******/ __webpack_require__.H.miniCss = (chunkId) => { +/******/ if((!__webpack_require__.o(installedCssChunks, chunkId) || installedCssChunks[chunkId] === undefined) && !/^[1458]$/.test(chunkId)) { +/******/ installedCssChunks[chunkId] = null; +/******/ var link = document.createElement('link'); +/******/ link.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ link.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ link.rel = "preload"; +/******/ link.as = "style"; +/******/ link.href = __webpack_require__.p + __webpack_require__.miniCssF(chunkId); +/******/ document.head.appendChild(link); +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 8: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ __webpack_require__.F.j = (chunkId) => { +/******/ if((!__webpack_require__.o(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && true) { +/******/ installedChunks[chunkId] = null; +/******/ var link = document.createElement('link'); +/******/ link.charset = 'utf-8'; +/******/ +/******/ if (__webpack_require__.nc) { +/******/ link.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ link.rel = "prefetch"; +/******/ link.as = "script"; +/******/ link.href = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ document.head.appendChild(link); +/******/ } +/******/ }; +/******/ +/******/ __webpack_require__.H.j = (chunkId) => { +/******/ if((!__webpack_require__.o(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && true) { +/******/ installedChunks[chunkId] = null; +/******/ var link = document.createElement('link'); +/******/ +/******/ link.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ link.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ link.rel = "preload"; +/******/ link.as = "script"; +/******/ link.href = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ document.head.appendChild(link); +/******/ } +/******/ }; +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ return __webpack_require__.O(result); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/******/ /* webpack/runtime/chunk prefetch trigger */ +/******/ (() => { +/******/ var chunkToChildrenMap = { +/******/ "1": [ +/******/ 2, +/******/ 4 +/******/ ] +/******/ }; +/******/ __webpack_require__.f.prefetch = (chunkId, promises) => (Promise.all(promises).then(() => { +/******/ var chunks = chunkToChildrenMap[chunkId]; +/******/ Array.isArray(chunks) && chunks.map(__webpack_require__.E); +/******/ })); +/******/ })(); +/******/ +/******/ /* webpack/runtime/chunk preload trigger */ +/******/ (() => { +/******/ var chunkToChildrenMap = { +/******/ "1": [ +/******/ 3 +/******/ ], +/******/ "5": [ +/******/ 6, +/******/ 7 +/******/ ] +/******/ }; +/******/ __webpack_require__.f.preload = (chunkId) => { +/******/ var chunks = chunkToChildrenMap[chunkId]; +/******/ Array.isArray(chunks) && chunks.map(__webpack_require__.G); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/startup prefetch */ +/******/ (() => { +/******/ __webpack_require__.O(0, [8], () => { +/******/ [0,1,5].map(__webpack_require__.E); +/******/ }, 5); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +__webpack_require__.e(/* import() | a */ 0).then(__webpack_require__.bind(__webpack_require__, 1)); +__webpack_require__.e(/* import() | b */ 1).then(__webpack_require__.t.bind(__webpack_require__, 2, 23)); +__webpack_require__.e(/* import() | c */ 5).then(__webpack_require__.t.bind(__webpack_require__, 3, 23)); + +__webpack_exports__ = __webpack_require__.O(__webpack_exports__); +/******/ })() +; \ No newline at end of file diff --git a/test/cases/prefetch-preload/index.js b/test/cases/prefetch-preload/index.js new file mode 100644 index 00000000..e1c87500 --- /dev/null +++ b/test/cases/prefetch-preload/index.js @@ -0,0 +1,3 @@ +import(/* webpackPrefetch: true, webpackChunkName: "a" */ "./a.css"); +import(/* webpackPrefetch: true, webpackChunkName: "b" */ "./b"); +import(/* webpackPrefetch: true, webpackChunkName: "c" */ "./c"); diff --git a/test/cases/prefetch-preload/webpack.config.js b/test/cases/prefetch-preload/webpack.config.js new file mode 100644 index 00000000..cf55c08c --- /dev/null +++ b/test/cases/prefetch-preload/webpack.config.js @@ -0,0 +1,18 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-absolute-url-1/expected/webpack-5-importModule/c9e192c015437a21dea1.svg b/test/cases/publicpath-absolute-url-1/expected/webpack-5-importModule/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-1/expected/webpack-5-importModule/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-1/expected/webpack-5-importModule/main.css b/test/cases/publicpath-absolute-url-1/expected/webpack-5-importModule/main.css new file mode 100644 index 00000000..235bfe1d --- /dev/null +++ b/test/cases/publicpath-absolute-url-1/expected/webpack-5-importModule/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://webpack.js.org/foo/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-absolute-url-1/expected/webpack-5/c9e192c015437a21dea1.svg b/test/cases/publicpath-absolute-url-1/expected/webpack-5/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-1/expected/webpack-5/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-1/expected/webpack-5/main.css b/test/cases/publicpath-absolute-url-1/expected/webpack-5/main.css new file mode 100644 index 00000000..a5f739f2 --- /dev/null +++ b/test/cases/publicpath-absolute-url-1/expected/webpack-5/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://webpack.js.org/foo/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-absolute-url-1/index.js b/test/cases/publicpath-absolute-url-1/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-absolute-url-1/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-absolute-url-1/react.svg b/test/cases/publicpath-absolute-url-1/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-1/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-1/style.css b/test/cases/publicpath-absolute-url-1/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-1/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-absolute-url-1/webpack.config.js b/test/cases/publicpath-absolute-url-1/webpack.config.js new file mode 100644 index 00000000..f205653a --- /dev/null +++ b/test/cases/publicpath-absolute-url-1/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "https://webpack.js.org/foo/", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-absolute-url-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg b/test/cases/publicpath-absolute-url-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-2/expected/webpack-5-importModule/main.css b/test/cases/publicpath-absolute-url-2/expected/webpack-5-importModule/main.css new file mode 100644 index 00000000..51e707b6 --- /dev/null +++ b/test/cases/publicpath-absolute-url-2/expected/webpack-5-importModule/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://webpack.js.org/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-absolute-url-2/expected/webpack-5/c9e192c015437a21dea1.svg b/test/cases/publicpath-absolute-url-2/expected/webpack-5/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-2/expected/webpack-5/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-2/expected/webpack-5/main.css b/test/cases/publicpath-absolute-url-2/expected/webpack-5/main.css new file mode 100644 index 00000000..8299a08f --- /dev/null +++ b/test/cases/publicpath-absolute-url-2/expected/webpack-5/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://webpack.js.org/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-absolute-url-2/index.js b/test/cases/publicpath-absolute-url-2/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-absolute-url-2/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-absolute-url-2/react.svg b/test/cases/publicpath-absolute-url-2/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-2/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-2/style.css b/test/cases/publicpath-absolute-url-2/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-2/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-absolute-url-2/webpack.config.js b/test/cases/publicpath-absolute-url-2/webpack.config.js new file mode 100644 index 00000000..434b8007 --- /dev/null +++ b/test/cases/publicpath-absolute-url-2/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "https://webpack.js.org/", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-absolute-url-3/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-absolute-url-3/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-3/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-3/expected/main.css b/test/cases/publicpath-absolute-url-3/expected/main.css new file mode 100644 index 00000000..59116df9 --- /dev/null +++ b/test/cases/publicpath-absolute-url-3/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://webpack.js.org./c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-absolute-url-3/index.js b/test/cases/publicpath-absolute-url-3/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-absolute-url-3/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-absolute-url-3/react.svg b/test/cases/publicpath-absolute-url-3/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-3/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-3/style.css b/test/cases/publicpath-absolute-url-3/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-3/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-absolute-url-3/webpack.config.js b/test/cases/publicpath-absolute-url-3/webpack.config.js new file mode 100644 index 00000000..d552eec5 --- /dev/null +++ b/test/cases/publicpath-absolute-url-3/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "https://webpack.js.org./", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-absolute-url-4/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-absolute-url-4/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-4/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-4/expected/main.css b/test/cases/publicpath-absolute-url-4/expected/main.css new file mode 100644 index 00000000..f045c80e --- /dev/null +++ b/test/cases/publicpath-absolute-url-4/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://webpack.js.org../c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-absolute-url-4/index.js b/test/cases/publicpath-absolute-url-4/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-absolute-url-4/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-absolute-url-4/react.svg b/test/cases/publicpath-absolute-url-4/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-4/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-4/style.css b/test/cases/publicpath-absolute-url-4/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-4/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-absolute-url-4/webpack.config.js b/test/cases/publicpath-absolute-url-4/webpack.config.js new file mode 100644 index 00000000..08e91969 --- /dev/null +++ b/test/cases/publicpath-absolute-url-4/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "https://webpack.js.org../", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-absolute-url-5/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-absolute-url-5/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-5/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-5/expected/main.css b/test/cases/publicpath-absolute-url-5/expected/main.css new file mode 100644 index 00000000..b6a34c6d --- /dev/null +++ b/test/cases/publicpath-absolute-url-5/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-absolute-url-5/index.js b/test/cases/publicpath-absolute-url-5/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-absolute-url-5/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-absolute-url-5/react.svg b/test/cases/publicpath-absolute-url-5/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-5/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-5/style.css b/test/cases/publicpath-absolute-url-5/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-5/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-absolute-url-5/webpack.config.js b/test/cases/publicpath-absolute-url-5/webpack.config.js new file mode 100644 index 00000000..06a88a33 --- /dev/null +++ b/test/cases/publicpath-absolute-url-5/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "/", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-absolute-url-6/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-absolute-url-6/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-6/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-6/expected/main.css b/test/cases/publicpath-absolute-url-6/expected/main.css new file mode 100644 index 00000000..fafa2579 --- /dev/null +++ b/test/cases/publicpath-absolute-url-6/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://cdn.example.com/assets/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-absolute-url-6/index.js b/test/cases/publicpath-absolute-url-6/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-absolute-url-6/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-absolute-url-6/react.svg b/test/cases/publicpath-absolute-url-6/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-6/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url-6/style.css b/test/cases/publicpath-absolute-url-6/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-absolute-url-6/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-absolute-url-6/webpack.config.js b/test/cases/publicpath-absolute-url-6/webpack.config.js new file mode 100644 index 00000000..cbe5b168 --- /dev/null +++ b/test/cases/publicpath-absolute-url-6/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "//cdn.example.com/assets/", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-absolute-url/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-absolute-url/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url/expected/main.css b/test/cases/publicpath-absolute-url/expected/main.css new file mode 100644 index 00000000..51e707b6 --- /dev/null +++ b/test/cases/publicpath-absolute-url/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://webpack.js.org/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-absolute-url/index.js b/test/cases/publicpath-absolute-url/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-absolute-url/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-absolute-url/react.svg b/test/cases/publicpath-absolute-url/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-absolute-url/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-absolute-url/style.css b/test/cases/publicpath-absolute-url/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-absolute-url/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-absolute-url/webpack.config.js b/test/cases/publicpath-absolute-url/webpack.config.js new file mode 100644 index 00000000..53eaaab9 --- /dev/null +++ b/test/cases/publicpath-absolute-url/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "https://webpack.js.org/", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-auto-2/expected/assets/img/react.svg b/test/cases/publicpath-auto-2/expected/assets/img/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-2/expected/assets/img/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-2/expected/same_root.svg b/test/cases/publicpath-auto-2/expected/same_root.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-2/expected/same_root.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-2/expected/styles/main.css b/test/cases/publicpath-auto-2/expected/styles/main.css new file mode 100644 index 00000000..ce980054 --- /dev/null +++ b/test/cases/publicpath-auto-2/expected/styles/main.css @@ -0,0 +1,20 @@ +.a { + background-image: url(https://github.com/same_root.svg); +} + +.b { + background-image: url(https://github.com/styles/same_dir.svg); +} + +.c { + background-image: url(https://github.com/styles/nested/nested_dir.svg); +} + +.d { + background-image: url(https://github.com/outer.svg); +} + +.e { + background-image: url(https://github.com/assets/img/react.svg); +} + diff --git a/test/cases/publicpath-auto-2/expected/styles/nested/nested_dir.svg b/test/cases/publicpath-auto-2/expected/styles/nested/nested_dir.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-2/expected/styles/nested/nested_dir.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-2/expected/styles/same_dir.svg b/test/cases/publicpath-auto-2/expected/styles/same_dir.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-2/expected/styles/same_dir.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-2/images/react.svg b/test/cases/publicpath-auto-2/images/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-2/images/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-2/index.js b/test/cases/publicpath-auto-2/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-auto-2/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-auto-2/nested_dir.svg b/test/cases/publicpath-auto-2/nested_dir.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-2/nested_dir.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-2/outer.svg b/test/cases/publicpath-auto-2/outer.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-2/outer.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-2/same_dir.svg b/test/cases/publicpath-auto-2/same_dir.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-2/same_dir.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-2/same_root.svg b/test/cases/publicpath-auto-2/same_root.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-2/same_root.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-2/style.css b/test/cases/publicpath-auto-2/style.css new file mode 100644 index 00000000..aacb0169 --- /dev/null +++ b/test/cases/publicpath-auto-2/style.css @@ -0,0 +1,19 @@ +.a { + background-image: url(https://github.com/same_root.svg); +} + +.b { + background-image: url(https://github.com/same_dir.svg); +} + +.c { + background-image: url(https://github.com/nested_dir.svg); +} + +.d { + background-image: url(https://github.com/outer.svg); +} + +.e { + background-image: url(https://github.com/images/react.svg); +} diff --git a/test/cases/publicpath-auto-2/webpack.config.js b/test/cases/publicpath-auto-2/webpack.config.js new file mode 100644 index 00000000..3fb0e338 --- /dev/null +++ b/test/cases/publicpath-auto-2/webpack.config.js @@ -0,0 +1,51 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + output: { + publicPath: "auto", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + "css-loader", + ], + }, + { + test: /outer\.(svg)$/, + type: "asset/resource", + generator: { filename: "../[name][ext]" }, + }, + { + test: /same_root\.(svg)$/, + type: "asset/resource", + generator: { filename: "[name][ext]" }, + }, + { + test: /same_dir\.(svg)$/, + type: "asset/resource", + generator: { filename: "styles/[name][ext]" }, + }, + { + test: /nested_dir\.(svg)$/, + type: "asset/resource", + generator: { filename: "styles/nested/[name][ext]" }, + }, + { + test: /react\.(svg)$/, + type: "asset/resource", + generator: { filename: "assets/img/[name][ext]" }, + }, + ], + }, + plugins: [ + new Self({ + filename: "styles/[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-auto-3/expected/assets/img/react.svg b/test/cases/publicpath-auto-3/expected/assets/img/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/expected/assets/img/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/expected/assets/img2.svg b/test/cases/publicpath-auto-3/expected/assets/img2.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/expected/assets/img2.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/expected/assets/nested/img3.svg b/test/cases/publicpath-auto-3/expected/assets/nested/img3.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/expected/assets/nested/img3.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/expected/img1.svg b/test/cases/publicpath-auto-3/expected/img1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/expected/img1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/expected/img4.svg b/test/cases/publicpath-auto-3/expected/img4.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/expected/img4.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/expected/main.css b/test/cases/publicpath-auto-3/expected/main.css new file mode 100644 index 00000000..a0162fed --- /dev/null +++ b/test/cases/publicpath-auto-3/expected/main.css @@ -0,0 +1,24 @@ +.a { + background-image: url(https://github.com/img1.svg); +} + +.b { + background-image: url(https://github.com/assets/img2.svg); +} + +.c { + background-image: url(https://github.com/assets/nested/img3.svg); +} + +.d { + background-image: url(https://github.com/img4.svg); +} + +.e { + background-image: url(https://github.com/assets/img/react.svg); +} + +.f { + background-image: url(https://github.com/outer.svg); +} + diff --git a/test/cases/publicpath-auto-3/images/react.svg b/test/cases/publicpath-auto-3/images/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/images/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/img2.svg b/test/cases/publicpath-auto-3/img2.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/img2.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/img3.svg b/test/cases/publicpath-auto-3/img3.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/img3.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/index.js b/test/cases/publicpath-auto-3/index.js new file mode 100644 index 00000000..332c82b0 --- /dev/null +++ b/test/cases/publicpath-auto-3/index.js @@ -0,0 +1 @@ +import "./src/styles/style.css"; diff --git a/test/cases/publicpath-auto-3/outer.svg b/test/cases/publicpath-auto-3/outer.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/outer.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/src/styles/img/img4.svg b/test/cases/publicpath-auto-3/src/styles/img/img4.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/src/styles/img/img4.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/src/styles/img1.svg b/test/cases/publicpath-auto-3/src/styles/img1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto-3/src/styles/img1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto-3/src/styles/style.css b/test/cases/publicpath-auto-3/src/styles/style.css new file mode 100644 index 00000000..783b19f7 --- /dev/null +++ b/test/cases/publicpath-auto-3/src/styles/style.css @@ -0,0 +1,23 @@ +.a { + background-image: url(https://github.com/img1.svg); +} + +.b { + background-image: url(https://github.com/img2.svg); +} + +.c { + background-image: url(https://github.com/img3.svg); +} + +.d { + background-image: url(https://github.com/img/img4.svg); +} + +.e { + background-image: url(https://github.com/images/react.svg); +} + +.f { + background-image: url(https://github.com/outer.svg); +} diff --git a/test/cases/publicpath-auto-3/webpack.config.js b/test/cases/publicpath-auto-3/webpack.config.js new file mode 100644 index 00000000..e0d935a6 --- /dev/null +++ b/test/cases/publicpath-auto-3/webpack.config.js @@ -0,0 +1,56 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "auto", + }, + }, + "css-loader", + ], + }, + { + test: /outer\.(svg)$/, + type: "asset/resource", + generator: { filename: "../[name][ext]" }, + }, + { + test: /img1\.(svg)$/, + type: "asset/resource", + generator: { filename: "[name][ext]" }, + }, + { + test: /img2\.(svg)$/, + type: "asset/resource", + generator: { filename: "assets/[name][ext]" }, + }, + { + test: /img3\.(svg)$/, + type: "asset/resource", + generator: { filename: "assets/nested/[name][ext]" }, + }, + { + test: /img4\.(svg)$/, + type: "asset/resource", + generator: { filename: "[name][ext]" }, + }, + { + test: /react\.(svg)$/, + type: "asset/resource", + generator: { filename: "assets/img/[name][ext]" }, + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-auto-4/app/img.png b/test/cases/publicpath-auto-4/app/img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/publicpath-auto-4/app/img.png differ diff --git a/test/cases/publicpath-auto-4/app/index.js b/test/cases/publicpath-auto-4/app/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-auto-4/app/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-auto-4/app/nested/nested-img.png b/test/cases/publicpath-auto-4/app/nested/nested-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/publicpath-auto-4/app/nested/nested-img.png differ diff --git a/test/cases/publicpath-auto-4/app/style.css b/test/cases/publicpath-auto-4/app/style.css new file mode 100644 index 00000000..f4c5ba40 --- /dev/null +++ b/test/cases/publicpath-auto-4/app/style.css @@ -0,0 +1,11 @@ +.a { + background: url("https://github.com/img.png"); +} + +.b { + background: url("https://github.com/outer-img.png"); +} + +.c { + background: url("https://github.com/nested/nested-img.png"); +} diff --git a/test/cases/publicpath-auto-4/expected/img.png b/test/cases/publicpath-auto-4/expected/img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/publicpath-auto-4/expected/img.png differ diff --git a/test/cases/publicpath-auto-4/expected/main.css b/test/cases/publicpath-auto-4/expected/main.css new file mode 100644 index 00000000..d3c74402 --- /dev/null +++ b/test/cases/publicpath-auto-4/expected/main.css @@ -0,0 +1,12 @@ +.a { + background: url(https://github.com/img.png); +} + +.b { + background: url(https://github.com/outer-img.png); +} + +.c { + background: url(https://github.com/nested/nested-img.png); +} + diff --git a/test/cases/publicpath-auto-4/expected/nested/nested-img.png b/test/cases/publicpath-auto-4/expected/nested/nested-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/publicpath-auto-4/expected/nested/nested-img.png differ diff --git a/test/cases/publicpath-auto-4/outer-img.png b/test/cases/publicpath-auto-4/outer-img.png new file mode 100644 index 00000000..b74b839e Binary files /dev/null and b/test/cases/publicpath-auto-4/outer-img.png differ diff --git a/test/cases/publicpath-auto-4/webpack.config.js b/test/cases/publicpath-auto-4/webpack.config.js new file mode 100644 index 00000000..e7f56ccc --- /dev/null +++ b/test/cases/publicpath-auto-4/webpack.config.js @@ -0,0 +1,36 @@ +import path from "path"; + +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + context: path.resolve(__dirname, "app"), + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "auto", + }, + }, + "css-loader", + ], + }, + { + test: /\.png$/, + type: "asset/resource", + generator: { + filename: "[path][name][ext]", + }, + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-auto/expected/webpack-5-importModule/assets/react.svg b/test/cases/publicpath-auto/expected/webpack-5-importModule/assets/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto/expected/webpack-5-importModule/assets/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto/expected/webpack-5-importModule/styles/1f2bc28d72f2b4b52ca6/main.css b/test/cases/publicpath-auto/expected/webpack-5-importModule/styles/1f2bc28d72f2b4b52ca6/main.css new file mode 100644 index 00000000..6b63f890 --- /dev/null +++ b/test/cases/publicpath-auto/expected/webpack-5-importModule/styles/1f2bc28d72f2b4b52ca6/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/assets/react.svg); +} + diff --git a/test/cases/publicpath-auto/expected/webpack-5/assets/react.svg b/test/cases/publicpath-auto/expected/webpack-5/assets/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto/expected/webpack-5/assets/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto/expected/webpack-5/styles/f46d3be95d50e953356d/main.css b/test/cases/publicpath-auto/expected/webpack-5/styles/f46d3be95d50e953356d/main.css new file mode 100644 index 00000000..6b63f890 --- /dev/null +++ b/test/cases/publicpath-auto/expected/webpack-5/styles/f46d3be95d50e953356d/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/assets/react.svg); +} + diff --git a/test/cases/publicpath-auto/index.js b/test/cases/publicpath-auto/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-auto/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-auto/react.svg b/test/cases/publicpath-auto/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-auto/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-auto/style.css b/test/cases/publicpath-auto/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-auto/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-auto/webpack.config.js b/test/cases/publicpath-auto/webpack.config.js new file mode 100644 index 00000000..54a7697f --- /dev/null +++ b/test/cases/publicpath-auto/webpack.config.js @@ -0,0 +1,31 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "auto", + }, + }, + "css-loader", + ], + }, + { + test: /\.(svg|png)$/, + type: "asset/resource", + generator: { filename: "assets/[name][ext]" }, + }, + ], + }, + plugins: [ + new Self({ + filename: "styles/[contenthash]/[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-default-auto/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-default-auto/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-default-auto/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-default-auto/expected/main.css b/test/cases/publicpath-default-auto/expected/main.css new file mode 100644 index 00000000..6e5140dd --- /dev/null +++ b/test/cases/publicpath-default-auto/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-default-auto/index.js b/test/cases/publicpath-default-auto/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-default-auto/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-default-auto/react.svg b/test/cases/publicpath-default-auto/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-default-auto/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-default-auto/style.css b/test/cases/publicpath-default-auto/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-default-auto/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-default-auto/webpack.config.js b/test/cases/publicpath-default-auto/webpack.config.js new file mode 100644 index 00000000..8b0e0e0e --- /dev/null +++ b/test/cases/publicpath-default-auto/webpack.config.js @@ -0,0 +1,21 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + output: { + publicPath: "auto", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-empty-string/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-empty-string/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-empty-string/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-empty-string/expected/main.css b/test/cases/publicpath-empty-string/expected/main.css new file mode 100644 index 00000000..6e5140dd --- /dev/null +++ b/test/cases/publicpath-empty-string/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-empty-string/index.js b/test/cases/publicpath-empty-string/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-empty-string/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-empty-string/react.svg b/test/cases/publicpath-empty-string/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-empty-string/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-empty-string/style.css b/test/cases/publicpath-empty-string/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-empty-string/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-empty-string/webpack.config.js b/test/cases/publicpath-empty-string/webpack.config.js new file mode 100644 index 00000000..a9d87fc5 --- /dev/null +++ b/test/cases/publicpath-empty-string/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-function-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg b/test/cases/publicpath-function-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-function-2/expected/webpack-5-importModule/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-function-2/expected/webpack-5-importModule/nested/again/style.css b/test/cases/publicpath-function-2/expected/webpack-5-importModule/nested/again/style.css new file mode 100644 index 00000000..5d0b093d --- /dev/null +++ b/test/cases/publicpath-function-2/expected/webpack-5-importModule/nested/again/style.css @@ -0,0 +1,5 @@ +body { + background: green; + background-image: url(http://example.com/XXXX/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-function-2/expected/webpack-5-importModule/nested/style.css b/test/cases/publicpath-function-2/expected/webpack-5-importModule/nested/style.css new file mode 100644 index 00000000..03203eac --- /dev/null +++ b/test/cases/publicpath-function-2/expected/webpack-5-importModule/nested/style.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(http://example.com/XXXX/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-function-2/expected/webpack-5/c9e192c015437a21dea1.svg b/test/cases/publicpath-function-2/expected/webpack-5/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-function-2/expected/webpack-5/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-function-2/expected/webpack-5/nested/again/style.css b/test/cases/publicpath-function-2/expected/webpack-5/nested/again/style.css new file mode 100644 index 00000000..dc4935e8 --- /dev/null +++ b/test/cases/publicpath-function-2/expected/webpack-5/nested/again/style.css @@ -0,0 +1,5 @@ +body { + background: green; + background-image: url(http://example.com/ab650ced14e52cab966b/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-function-2/expected/webpack-5/nested/style.css b/test/cases/publicpath-function-2/expected/webpack-5/nested/style.css new file mode 100644 index 00000000..c6c4a190 --- /dev/null +++ b/test/cases/publicpath-function-2/expected/webpack-5/nested/style.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(http://example.com/41c32920aa5f377c118c/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-function-2/nested/again/style.css b/test/cases/publicpath-function-2/nested/again/style.css new file mode 100644 index 00000000..254f81b4 --- /dev/null +++ b/test/cases/publicpath-function-2/nested/again/style.css @@ -0,0 +1,4 @@ +body { + background: green; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-function-2/nested/style.css b/test/cases/publicpath-function-2/nested/style.css new file mode 100644 index 00000000..c9853be3 --- /dev/null +++ b/test/cases/publicpath-function-2/nested/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-function-2/react.svg b/test/cases/publicpath-function-2/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-function-2/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-function-2/webpack.config.js b/test/cases/publicpath-function-2/webpack.config.js new file mode 100644 index 00000000..0b882698 --- /dev/null +++ b/test/cases/publicpath-function-2/webpack.config.js @@ -0,0 +1,32 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + // Specific CSS entry point, with output to a nested folder + "nested/style": "./nested/style.css", + // Note that relative nesting of output is the same as that of the input + "nested/again/style": "./nested/again/style.css", + }, + output: { + // Compute publicPath relative to the CSS output + publicPath: (pathData) => `http://example.com/${pathData.hash}/`, + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-function/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-function/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-function/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-function/expected/nested/again/style.css b/test/cases/publicpath-function/expected/nested/again/style.css new file mode 100644 index 00000000..5763ca17 --- /dev/null +++ b/test/cases/publicpath-function/expected/nested/again/style.css @@ -0,0 +1,5 @@ +body { + background: green; + background-image: url(https://github.com/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-function/expected/nested/style.css b/test/cases/publicpath-function/expected/nested/style.css new file mode 100644 index 00000000..b8d5f36c --- /dev/null +++ b/test/cases/publicpath-function/expected/nested/style.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-function/nested/again/style.css b/test/cases/publicpath-function/nested/again/style.css new file mode 100644 index 00000000..254f81b4 --- /dev/null +++ b/test/cases/publicpath-function/nested/again/style.css @@ -0,0 +1,4 @@ +body { + background: green; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-function/nested/style.css b/test/cases/publicpath-function/nested/style.css new file mode 100644 index 00000000..c9853be3 --- /dev/null +++ b/test/cases/publicpath-function/nested/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-function/react.svg b/test/cases/publicpath-function/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-function/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-function/webpack.config.js b/test/cases/publicpath-function/webpack.config.js new file mode 100644 index 00000000..c7596003 --- /dev/null +++ b/test/cases/publicpath-function/webpack.config.js @@ -0,0 +1,37 @@ +import path from "path"; + +import Self from "../../../src"; + +module.exports = { + entry: { + // Specific CSS entry point, with output to a nested folder + "nested/style": "./nested/style.css", + // Note that relative nesting of output is the same as that of the input + "nested/again/style": "./nested/again/style.css", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + // Compute publicPath relative to the CSS output + publicPath: (resourcePath, context) => + `${path + .relative(path.dirname(resourcePath), context) + .replace(/\\/g, "/")}/`, + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-loader-auto/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-loader-auto/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-loader-auto/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-loader-auto/expected/main.css b/test/cases/publicpath-loader-auto/expected/main.css new file mode 100644 index 00000000..6e5140dd --- /dev/null +++ b/test/cases/publicpath-loader-auto/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-loader-auto/index.js b/test/cases/publicpath-loader-auto/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-loader-auto/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-loader-auto/react.svg b/test/cases/publicpath-loader-auto/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-loader-auto/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-loader-auto/style.css b/test/cases/publicpath-loader-auto/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-loader-auto/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-loader-auto/webpack.config.js b/test/cases/publicpath-loader-auto/webpack.config.js new file mode 100644 index 00000000..b9487eb6 --- /dev/null +++ b/test/cases/publicpath-loader-auto/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "auto", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-path-relative-1/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-path-relative-1/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-1/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-1/expected/main.css b/test/cases/publicpath-path-relative-1/expected/main.css new file mode 100644 index 00000000..cb19e5ea --- /dev/null +++ b/test/cases/publicpath-path-relative-1/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/static/deepc9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-path-relative-1/index.js b/test/cases/publicpath-path-relative-1/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-path-relative-1/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-path-relative-1/react.svg b/test/cases/publicpath-path-relative-1/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-1/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-1/style.css b/test/cases/publicpath-path-relative-1/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-path-relative-1/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-path-relative-1/webpack.config.js b/test/cases/publicpath-path-relative-1/webpack.config.js new file mode 100644 index 00000000..082f3979 --- /dev/null +++ b/test/cases/publicpath-path-relative-1/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "/static/img/../deep", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-path-relative-2/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-path-relative-2/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-2/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-2/expected/main.css b/test/cases/publicpath-path-relative-2/expected/main.css new file mode 100644 index 00000000..b8d5f36c --- /dev/null +++ b/test/cases/publicpath-path-relative-2/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-path-relative-2/index.js b/test/cases/publicpath-path-relative-2/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-path-relative-2/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-path-relative-2/react.svg b/test/cases/publicpath-path-relative-2/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-2/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-2/style.css b/test/cases/publicpath-path-relative-2/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-path-relative-2/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-path-relative-2/webpack.config.js b/test/cases/publicpath-path-relative-2/webpack.config.js new file mode 100644 index 00000000..6ef334e1 --- /dev/null +++ b/test/cases/publicpath-path-relative-2/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "../", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-path-relative-3/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-path-relative-3/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-3/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-3/expected/main.css b/test/cases/publicpath-path-relative-3/expected/main.css new file mode 100644 index 00000000..b6a34c6d --- /dev/null +++ b/test/cases/publicpath-path-relative-3/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-path-relative-3/index.js b/test/cases/publicpath-path-relative-3/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-path-relative-3/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-path-relative-3/react.svg b/test/cases/publicpath-path-relative-3/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-3/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-3/style.css b/test/cases/publicpath-path-relative-3/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-path-relative-3/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-path-relative-3/webpack.config.js b/test/cases/publicpath-path-relative-3/webpack.config.js new file mode 100644 index 00000000..06a88a33 --- /dev/null +++ b/test/cases/publicpath-path-relative-3/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "/", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-path-relative-4/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-path-relative-4/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-4/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-4/expected/main.css b/test/cases/publicpath-path-relative-4/expected/main.css new file mode 100644 index 00000000..74063e49 --- /dev/null +++ b/test/cases/publicpath-path-relative-4/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-path-relative-4/index.js b/test/cases/publicpath-path-relative-4/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-path-relative-4/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-path-relative-4/react.svg b/test/cases/publicpath-path-relative-4/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-4/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-4/style.css b/test/cases/publicpath-path-relative-4/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-path-relative-4/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-path-relative-4/webpack.config.js b/test/cases/publicpath-path-relative-4/webpack.config.js new file mode 100644 index 00000000..8c754719 --- /dev/null +++ b/test/cases/publicpath-path-relative-4/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "./", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-path-relative-5/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-path-relative-5/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-5/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-5/expected/main.css b/test/cases/publicpath-path-relative-5/expected/main.css new file mode 100644 index 00000000..49156322 --- /dev/null +++ b/test/cases/publicpath-path-relative-5/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/static/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-path-relative-5/index.js b/test/cases/publicpath-path-relative-5/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-path-relative-5/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-path-relative-5/react.svg b/test/cases/publicpath-path-relative-5/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-5/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-5/style.css b/test/cases/publicpath-path-relative-5/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-path-relative-5/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-path-relative-5/webpack.config.js b/test/cases/publicpath-path-relative-5/webpack.config.js new file mode 100644 index 00000000..b4bd314b --- /dev/null +++ b/test/cases/publicpath-path-relative-5/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "../static/", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-path-relative-6/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-path-relative-6/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-6/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-6/expected/main.css b/test/cases/publicpath-path-relative-6/expected/main.css new file mode 100644 index 00000000..52bd1ff4 --- /dev/null +++ b/test/cases/publicpath-path-relative-6/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/static/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-path-relative-6/index.js b/test/cases/publicpath-path-relative-6/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-path-relative-6/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-path-relative-6/react.svg b/test/cases/publicpath-path-relative-6/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-6/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-6/style.css b/test/cases/publicpath-path-relative-6/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-path-relative-6/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-path-relative-6/webpack.config.js b/test/cases/publicpath-path-relative-6/webpack.config.js new file mode 100644 index 00000000..c09766d3 --- /dev/null +++ b/test/cases/publicpath-path-relative-6/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "./static/", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-path-relative-7/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-path-relative-7/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-7/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-7/expected/main.css b/test/cases/publicpath-path-relative-7/expected/main.css new file mode 100644 index 00000000..c36ec483 --- /dev/null +++ b/test/cases/publicpath-path-relative-7/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/staticc9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-path-relative-7/index.js b/test/cases/publicpath-path-relative-7/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-path-relative-7/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-path-relative-7/react.svg b/test/cases/publicpath-path-relative-7/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative-7/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative-7/style.css b/test/cases/publicpath-path-relative-7/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-path-relative-7/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-path-relative-7/webpack.config.js b/test/cases/publicpath-path-relative-7/webpack.config.js new file mode 100644 index 00000000..93763fee --- /dev/null +++ b/test/cases/publicpath-path-relative-7/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "static", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/publicpath-path-relative/expected/c9e192c015437a21dea1.svg b/test/cases/publicpath-path-relative/expected/c9e192c015437a21dea1.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative/expected/c9e192c015437a21dea1.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative/expected/main.css b/test/cases/publicpath-path-relative/expected/main.css new file mode 100644 index 00000000..c00335a6 --- /dev/null +++ b/test/cases/publicpath-path-relative/expected/main.css @@ -0,0 +1,5 @@ +body { + background: red; + background-image: url(https://github.com/static/img/c9e192c015437a21dea1.svg); +} + diff --git a/test/cases/publicpath-path-relative/index.js b/test/cases/publicpath-path-relative/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/publicpath-path-relative/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/publicpath-path-relative/react.svg b/test/cases/publicpath-path-relative/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/cases/publicpath-path-relative/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/cases/publicpath-path-relative/style.css b/test/cases/publicpath-path-relative/style.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/cases/publicpath-path-relative/style.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/cases/publicpath-path-relative/webpack.config.js b/test/cases/publicpath-path-relative/webpack.config.js new file mode 100644 index 00000000..8e00db9a --- /dev/null +++ b/test/cases/publicpath-path-relative/webpack.config.js @@ -0,0 +1,26 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + options: { + publicPath: "/static/img/", + }, + }, + "css-loader", + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/runtime/async.js b/test/cases/runtime/async.js new file mode 100644 index 00000000..55223ca5 --- /dev/null +++ b/test/cases/runtime/async.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line no-console +console.log("HERE"); diff --git a/test/cases/runtime/expected/main.a45a4571ab5cece12cf0.css b/test/cases/runtime/expected/main.a45a4571ab5cece12cf0.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/runtime/expected/main.a45a4571ab5cece12cf0.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/runtime/expected/runtime~main.js b/test/cases/runtime/expected/runtime~main.js new file mode 100644 index 00000000..25e350d1 --- /dev/null +++ b/test/cases/runtime/expected/runtime~main.js @@ -0,0 +1,328 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/chunk loaded */ +/******/ (() => { +/******/ var deferred = []; +/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ if(chunkIds) { +/******/ priority = priority || 0; +/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; +/******/ deferred[i] = [chunkIds, fn, priority]; +/******/ return; +/******/ } +/******/ var notFulfilled = Infinity; +/******/ for (var i = 0; i < deferred.length; i++) { +/******/ var [chunkIds, fn, priority] = deferred[i]; +/******/ var fulfilled = true; +/******/ for (var j = 0; j < chunkIds.length; j++) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { +/******/ chunkIds.splice(j--, 1); +/******/ } else { +/******/ fulfilled = false; +/******/ if(priority < notFulfilled) notFulfilled = priority; +/******/ } +/******/ } +/******/ if(fulfilled) { +/******/ deferred.splice(i--, 1) +/******/ var r = fn(); +/******/ if (r !== undefined) result = r; +/******/ } +/******/ } +/******/ return result; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/create fake namespace object */ +/******/ (() => { +/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); +/******/ var leafPrototypes; +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 16: return value when it's Promise-like +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = this(value); +/******/ if(mode & 8) return value; +/******/ if(typeof value === 'object' && value) { +/******/ if((mode & 4) && value.__esModule) return value; +/******/ if((mode & 16) && typeof value.then === 'function') return value; +/******/ } +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ var def = {}; +/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; +/******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) { +/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); +/******/ } +/******/ def['default'] = () => (value); +/******/ __webpack_require__.d(ns, def); +/******/ return ns; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get mini-css chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.miniCssF = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return undefined; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 1: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(1 != chunkId) { +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); +/******/ } else installedChunks[chunkId] = 0; +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ return __webpack_require__.O(result); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ +/******/ })() +; \ No newline at end of file diff --git a/test/cases/runtime/index.js b/test/cases/runtime/index.js new file mode 100644 index 00000000..0e0da3fd --- /dev/null +++ b/test/cases/runtime/index.js @@ -0,0 +1,4 @@ +// eslint-disable-next-line import/no-unresolved +import "./style.css"; + +import("./async"); diff --git a/test/cases/runtime/style.css b/test/cases/runtime/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/runtime/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/runtime/webpack.config.js b/test/cases/runtime/webpack.config.js new file mode 100644 index 00000000..8f433156 --- /dev/null +++ b/test/cases/runtime/webpack.config.js @@ -0,0 +1,25 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + output: { + filename: `[name].js`, + }, + plugins: [ + new Self({ + filename: `[name].[contenthash].css`, + chunkFilename: `[name].[contenthash].css`, + }), + ], + optimization: { + runtimeChunk: true, + }, +}; diff --git a/test/cases/serializingBigStrings/webpack.config.js b/test/cases/serializingBigStrings/webpack.config.js new file mode 100644 index 00000000..72d6de49 --- /dev/null +++ b/test/cases/serializingBigStrings/webpack.config.js @@ -0,0 +1,35 @@ +import Self from "../../../src/index"; + +module.exports = { + cache: { type: "filesystem" }, + entry: "bootstrap/dist/css/bootstrap.css", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + options: { + sourceMap: true, + }, + }, + ], + }, + ], + }, + + plugins: [ + new Self(), + { + apply(compiler) { + compiler.hooks.infrastructureLog.tap("test", (origin, type, args) => { + if (type === "warn" || type === "error") { + throw new Error(`<${type}> [${origin}] ${args.toString()}`); + } + }); + }, + }, + ], +}; diff --git a/test/cases/shared-import/index.js b/test/cases/shared-import/index.js index bd92052b..89a5d766 100644 --- a/test/cases/shared-import/index.js +++ b/test/cases/shared-import/index.js @@ -1,4 +1,5 @@ -import './a.css'; -import './b.css'; +import "./a.css"; +import "./b.css"; +/* eslint-disable-next-line no-unused-expressions */ import("./c.css"); diff --git a/test/cases/shared-import/webpack.config.js b/test/cases/shared-import/webpack.config.js index a22ebdad..cf55c08c 100644 --- a/test/cases/shared-import/webpack.config.js +++ b/test/cases/shared-import/webpack.config.js @@ -1,21 +1,18 @@ -const Self = require('../../../'); +import Self from "../../../src"; module.exports = { - entry: './index.js', + entry: "./index.js", module: { rules: [ { test: /\.css$/, - use: [ - Self.loader, - 'css-loader', - ], + use: [Self.loader, "css-loader"], }, ], }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", }), ], }; diff --git a/test/cases/simple-async-load-css-fallback/a.css b/test/cases/simple-async-load-css-fallback/a.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/a.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/simple-async-load-css-fallback/async-one.js b/test/cases/simple-async-load-css-fallback/async-one.js new file mode 100644 index 00000000..eb558470 --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/async-one.js @@ -0,0 +1,2 @@ +import "./c.css"; +import "./d.css"; diff --git a/test/cases/simple-async-load-css-fallback/async-two.js b/test/cases/simple-async-load-css-fallback/async-two.js new file mode 100644 index 00000000..bdf9cbec --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/async-two.js @@ -0,0 +1,2 @@ +import "./e.css"; +import "./f.css"; diff --git a/test/cases/simple-async-load-css-fallback/b.css b/test/cases/simple-async-load-css-fallback/b.css new file mode 100644 index 00000000..90439bac --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/b.css @@ -0,0 +1,3 @@ +body { + background: green; +} diff --git a/test/cases/simple-async-load-css-fallback/c.css b/test/cases/simple-async-load-css-fallback/c.css new file mode 100644 index 00000000..ae844dcf --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/c.css @@ -0,0 +1,3 @@ +body { + background: blue; +} diff --git a/test/cases/simple-async-load-css-fallback/d.css b/test/cases/simple-async-load-css-fallback/d.css new file mode 100644 index 00000000..19f99652 --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/d.css @@ -0,0 +1,3 @@ +body { + background: yellow; +} diff --git a/test/cases/simple-async-load-css-fallback/e.css b/test/cases/simple-async-load-css-fallback/e.css new file mode 100644 index 00000000..8e37f694 --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/e.css @@ -0,0 +1,3 @@ +body { + background: purple; +} diff --git a/test/cases/simple-async-load-css-fallback/expected/async-one.css b/test/cases/simple-async-load-css-fallback/expected/async-one.css new file mode 100644 index 00000000..f2076200 --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/expected/async-one.css @@ -0,0 +1,8 @@ +body { + background: blue; +} + +body { + background: yellow; +} + diff --git a/test/cases/simple-async-load-css-fallback/expected/async-two.css b/test/cases/simple-async-load-css-fallback/expected/async-two.css new file mode 100644 index 00000000..8fcd7f6d --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/expected/async-two.css @@ -0,0 +1,8 @@ +body { + background: purple; +} + +body { + background: indigo; +} + diff --git a/test/cases/simple-async-load-css-fallback/expected/main.css b/test/cases/simple-async-load-css-fallback/expected/main.css new file mode 100644 index 00000000..ef78f8b7 --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/expected/main.css @@ -0,0 +1,8 @@ +body { + background: red; +} + +body { + background: green; +} + diff --git a/test/cases/simple-async-load-css-fallback/f.css b/test/cases/simple-async-load-css-fallback/f.css new file mode 100644 index 00000000..30c5a4fb --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/f.css @@ -0,0 +1,3 @@ +body { + background: indigo; +} diff --git a/test/cases/simple-async-load-css-fallback/index.js b/test/cases/simple-async-load-css-fallback/index.js new file mode 100644 index 00000000..66ed9b02 --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/index.js @@ -0,0 +1,7 @@ +import "./a.css"; +import "./b.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: 'async-one' */ "./async-one"); +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: 'async-two' */ "./async-two"); diff --git a/test/cases/simple-async-load-css-fallback/webpack.config.js b/test/cases/simple-async-load-css-fallback/webpack.config.js new file mode 100644 index 00000000..072aeac1 --- /dev/null +++ b/test/cases/simple-async-load-css-fallback/webpack.config.js @@ -0,0 +1,31 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + main: "./index.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + function Plugin() { + this.hooks.compilation.tap("Test", (compilation) => { + compilation.hooks.beforeChunkAssets.tap("Test", () => { + for (const chunkGroup of compilation.chunkGroups) { + // remove getModuleIndex2 to enforce using fallback + // eslint-disable-next-line no-undefined + chunkGroup.getModuleIndex2 = undefined; + } + }); + }); + }, + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/simple-async-load-css/a.css b/test/cases/simple-async-load-css/a.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/simple-async-load-css/a.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/simple-async-load-css/async-one.js b/test/cases/simple-async-load-css/async-one.js new file mode 100644 index 00000000..eb558470 --- /dev/null +++ b/test/cases/simple-async-load-css/async-one.js @@ -0,0 +1,2 @@ +import "./c.css"; +import "./d.css"; diff --git a/test/cases/simple-async-load-css/async-two.js b/test/cases/simple-async-load-css/async-two.js new file mode 100644 index 00000000..bdf9cbec --- /dev/null +++ b/test/cases/simple-async-load-css/async-two.js @@ -0,0 +1,2 @@ +import "./e.css"; +import "./f.css"; diff --git a/test/cases/simple-async-load-css/b.css b/test/cases/simple-async-load-css/b.css new file mode 100644 index 00000000..90439bac --- /dev/null +++ b/test/cases/simple-async-load-css/b.css @@ -0,0 +1,3 @@ +body { + background: green; +} diff --git a/test/cases/simple-async-load-css/c.css b/test/cases/simple-async-load-css/c.css new file mode 100644 index 00000000..ae844dcf --- /dev/null +++ b/test/cases/simple-async-load-css/c.css @@ -0,0 +1,3 @@ +body { + background: blue; +} diff --git a/test/cases/simple-async-load-css/d.css b/test/cases/simple-async-load-css/d.css new file mode 100644 index 00000000..19f99652 --- /dev/null +++ b/test/cases/simple-async-load-css/d.css @@ -0,0 +1,3 @@ +body { + background: yellow; +} diff --git a/test/cases/simple-async-load-css/e.css b/test/cases/simple-async-load-css/e.css new file mode 100644 index 00000000..8e37f694 --- /dev/null +++ b/test/cases/simple-async-load-css/e.css @@ -0,0 +1,3 @@ +body { + background: purple; +} diff --git a/test/cases/simple-async-load-css/expected/async-one.css b/test/cases/simple-async-load-css/expected/async-one.css new file mode 100644 index 00000000..f2076200 --- /dev/null +++ b/test/cases/simple-async-load-css/expected/async-one.css @@ -0,0 +1,8 @@ +body { + background: blue; +} + +body { + background: yellow; +} + diff --git a/test/cases/simple-async-load-css/expected/async-two.css b/test/cases/simple-async-load-css/expected/async-two.css new file mode 100644 index 00000000..8fcd7f6d --- /dev/null +++ b/test/cases/simple-async-load-css/expected/async-two.css @@ -0,0 +1,8 @@ +body { + background: purple; +} + +body { + background: indigo; +} + diff --git a/test/cases/simple-async-load-css/expected/main.css b/test/cases/simple-async-load-css/expected/main.css new file mode 100644 index 00000000..ef78f8b7 --- /dev/null +++ b/test/cases/simple-async-load-css/expected/main.css @@ -0,0 +1,8 @@ +body { + background: red; +} + +body { + background: green; +} + diff --git a/test/cases/simple-async-load-css/f.css b/test/cases/simple-async-load-css/f.css new file mode 100644 index 00000000..30c5a4fb --- /dev/null +++ b/test/cases/simple-async-load-css/f.css @@ -0,0 +1,3 @@ +body { + background: indigo; +} diff --git a/test/cases/simple-async-load-css/index.js b/test/cases/simple-async-load-css/index.js new file mode 100644 index 00000000..66ed9b02 --- /dev/null +++ b/test/cases/simple-async-load-css/index.js @@ -0,0 +1,7 @@ +import "./a.css"; +import "./b.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: 'async-one' */ "./async-one"); +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: 'async-two' */ "./async-two"); diff --git a/test/cases/simple-async-load-css/webpack.config.js b/test/cases/simple-async-load-css/webpack.config.js new file mode 100644 index 00000000..64326a95 --- /dev/null +++ b/test/cases/simple-async-load-css/webpack.config.js @@ -0,0 +1,20 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + main: "./index.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/simple-async-source-map/async.css b/test/cases/simple-async-source-map/async.css index a9779cd8..65bdcfa7 100644 --- a/test/cases/simple-async-source-map/async.css +++ b/test/cases/simple-async-source-map/async.css @@ -1 +1,3 @@ -.async { background: blue; } +.async { + background: blue; +} diff --git a/test/cases/simple-async-source-map/async.js b/test/cases/simple-async-source-map/async.js index 1a2ee580..10fdd583 100644 --- a/test/cases/simple-async-source-map/async.js +++ b/test/cases/simple-async-source-map/async.js @@ -1 +1 @@ -import './in-async.css'; +import "./in-async.css"; diff --git a/test/cases/simple-async-source-map/expected/1.css b/test/cases/simple-async-source-map/expected/1.css index 81d8562f..18c06fae 100644 --- a/test/cases/simple-async-source-map/expected/1.css +++ b/test/cases/simple-async-source-map/expected/1.css @@ -1,4 +1,6 @@ -.in-async { background: green; } +.in-async { + background: green; +} /*# sourceMappingURL=1.css.map*/ \ No newline at end of file diff --git a/test/cases/simple-async-source-map/expected/1.css.map b/test/cases/simple-async-source-map/expected/1.css.map index 0088555b..afbfea45 100644 --- a/test/cases/simple-async-source-map/expected/1.css.map +++ b/test/cases/simple-async-source-map/expected/1.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./in-async.css"],"names":[],"mappings":"AAAA,WAAW,mBAAmB","file":"1.css","sourcesContent":[".in-async { background: green; }\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"1.css","mappings":"AAAA;EACE,iBAAiB;AACnB","sources":["webpack:///./in-async.css"],"sourcesContent":[".in-async {\n background: green;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/test/cases/simple-async-source-map/expected/2.css b/test/cases/simple-async-source-map/expected/2.css index f82d2c4f..64cde675 100644 --- a/test/cases/simple-async-source-map/expected/2.css +++ b/test/cases/simple-async-source-map/expected/2.css @@ -1,4 +1,6 @@ -.async { background: blue; } +.async { + background: blue; +} /*# sourceMappingURL=2.css.map*/ \ No newline at end of file diff --git a/test/cases/simple-async-source-map/expected/2.css.map b/test/cases/simple-async-source-map/expected/2.css.map index 44e7b26b..78d5fc2d 100644 --- a/test/cases/simple-async-source-map/expected/2.css.map +++ b/test/cases/simple-async-source-map/expected/2.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./async.css"],"names":[],"mappings":"AAAA,QAAQ,kBAAkB","file":"2.css","sourcesContent":[".async { background: blue; }\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"2.css","mappings":"AAAA;EACE,gBAAgB;AAClB","sources":["webpack:///./async.css"],"sourcesContent":[".async {\n background: blue;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/test/cases/simple-async-source-map/expected/main.css b/test/cases/simple-async-source-map/expected/main.css index e7d36a90..8f8cf968 100644 --- a/test/cases/simple-async-source-map/expected/main.css +++ b/test/cases/simple-async-source-map/expected/main.css @@ -1,4 +1,6 @@ -body { background: red; } +body { + background: red; +} /*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/test/cases/simple-async-source-map/expected/main.css.map b/test/cases/simple-async-source-map/expected/main.css.map index bc9facb2..bd7cac88 100644 --- a/test/cases/simple-async-source-map/expected/main.css.map +++ b/test/cases/simple-async-source-map/expected/main.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./main.css"],"names":[],"mappings":"AAAA,MAAM,iBAAiB","file":"main.css","sourcesContent":["body { background: red; }\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"main.css","mappings":"AAAA;EACE,eAAe;AACjB","sources":["webpack:///./main.css"],"sourcesContent":["body {\n background: red;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/test/cases/simple-async-source-map/in-async.css b/test/cases/simple-async-source-map/in-async.css index 85e56aff..be7a8bc6 100644 --- a/test/cases/simple-async-source-map/in-async.css +++ b/test/cases/simple-async-source-map/in-async.css @@ -1 +1,3 @@ -.in-async { background: green; } +.in-async { + background: green; +} diff --git a/test/cases/simple-async-source-map/index.js b/test/cases/simple-async-source-map/index.js index 010bff00..6c74b41d 100644 --- a/test/cases/simple-async-source-map/index.js +++ b/test/cases/simple-async-source-map/index.js @@ -1,5 +1,7 @@ -import './main.css'; +import "./main.css"; -import('./async'); +/* eslint-disable-next-line no-unused-expressions */ +import("./async"); -import('./async.css'); +/* eslint-disable-next-line no-unused-expressions */ +import("./async.css"); diff --git a/test/cases/simple-async-source-map/main.css b/test/cases/simple-async-source-map/main.css index 31fc5b8a..67ce83e4 100644 --- a/test/cases/simple-async-source-map/main.css +++ b/test/cases/simple-async-source-map/main.css @@ -1 +1,3 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/simple-async-source-map/webpack.config.js b/test/cases/simple-async-source-map/webpack.config.js index c88383f2..4e07e687 100644 --- a/test/cases/simple-async-source-map/webpack.config.js +++ b/test/cases/simple-async-source-map/webpack.config.js @@ -1,22 +1,19 @@ -const Self = require('../../../'); +import Self from "../../../src"; module.exports = { - entry: './index.js', - devtool: 'source-map', + entry: "./index.js", + devtool: "source-map", module: { rules: [ { test: /\.css$/, - use: [ - Self.loader, - 'css-loader', - ], + use: [Self.loader, "css-loader"], }, ], }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", }), ], }; diff --git a/test/cases/simple-async/async.css b/test/cases/simple-async/async.css index a9779cd8..65bdcfa7 100644 --- a/test/cases/simple-async/async.css +++ b/test/cases/simple-async/async.css @@ -1 +1,3 @@ -.async { background: blue; } +.async { + background: blue; +} diff --git a/test/cases/simple-async/async.js b/test/cases/simple-async/async.js index 1a2ee580..10fdd583 100644 --- a/test/cases/simple-async/async.js +++ b/test/cases/simple-async/async.js @@ -1 +1 @@ -import './in-async.css'; +import "./in-async.css"; diff --git a/test/cases/simple-async/expected/1.css b/test/cases/simple-async/expected/1.css index 92eec627..9dc882a1 100644 --- a/test/cases/simple-async/expected/1.css +++ b/test/cases/simple-async/expected/1.css @@ -1,2 +1,4 @@ -.in-async { background: green; } +.in-async { + background: green; +} diff --git a/test/cases/simple-async/expected/2.css b/test/cases/simple-async/expected/2.css index 0a0fb724..67332816 100644 --- a/test/cases/simple-async/expected/2.css +++ b/test/cases/simple-async/expected/2.css @@ -1,2 +1,4 @@ -.async { background: blue; } +.async { + background: blue; +} diff --git a/test/cases/simple-async/expected/main.css b/test/cases/simple-async/expected/main.css index aea53e43..cebc5c1c 100644 --- a/test/cases/simple-async/expected/main.css +++ b/test/cases/simple-async/expected/main.css @@ -1,2 +1,4 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/simple-async/in-async.css b/test/cases/simple-async/in-async.css index 85e56aff..be7a8bc6 100644 --- a/test/cases/simple-async/in-async.css +++ b/test/cases/simple-async/in-async.css @@ -1 +1,3 @@ -.in-async { background: green; } +.in-async { + background: green; +} diff --git a/test/cases/simple-async/index.js b/test/cases/simple-async/index.js index 010bff00..6c74b41d 100644 --- a/test/cases/simple-async/index.js +++ b/test/cases/simple-async/index.js @@ -1,5 +1,7 @@ -import './main.css'; +import "./main.css"; -import('./async'); +/* eslint-disable-next-line no-unused-expressions */ +import("./async"); -import('./async.css'); +/* eslint-disable-next-line no-unused-expressions */ +import("./async.css"); diff --git a/test/cases/simple-async/main.css b/test/cases/simple-async/main.css index 31fc5b8a..67ce83e4 100644 --- a/test/cases/simple-async/main.css +++ b/test/cases/simple-async/main.css @@ -1 +1,3 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/simple-async/webpack.config.js b/test/cases/simple-async/webpack.config.js index a22ebdad..cf55c08c 100644 --- a/test/cases/simple-async/webpack.config.js +++ b/test/cases/simple-async/webpack.config.js @@ -1,21 +1,18 @@ -const Self = require('../../../'); +import Self from "../../../src"; module.exports = { - entry: './index.js', + entry: "./index.js", module: { rules: [ { test: /\.css$/, - use: [ - Self.loader, - 'css-loader', - ], + use: [Self.loader, "css-loader"], }, ], }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", }), ], }; diff --git a/test/cases/simple-commonjs-syntax/expected/main.css b/test/cases/simple-commonjs-syntax/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/simple-commonjs-syntax/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/simple-commonjs-syntax/index.js b/test/cases/simple-commonjs-syntax/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/simple-commonjs-syntax/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/simple-commonjs-syntax/style.css b/test/cases/simple-commonjs-syntax/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/simple-commonjs-syntax/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/simple-commonjs-syntax/webpack.config.js b/test/cases/simple-commonjs-syntax/webpack.config.js new file mode 100644 index 00000000..8933fde1 --- /dev/null +++ b/test/cases/simple-commonjs-syntax/webpack.config.js @@ -0,0 +1,25 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + // TODO Uncomment after `css-loader` release the `esModule` option + // options: { esModule: false }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/simple-css-modules-mode-global/expected/main.css b/test/cases/simple-css-modules-mode-global/expected/main.css new file mode 100644 index 00000000..1dc01d87 --- /dev/null +++ b/test/cases/simple-css-modules-mode-global/expected/main.css @@ -0,0 +1,12 @@ +.a { + background: red; +} + +.foo__style__b { + color: green; +} + +.c { + color: blue; +} + diff --git a/test/cases/simple-css-modules-mode-global/index.js b/test/cases/simple-css-modules-mode-global/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/simple-css-modules-mode-global/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/simple-css-modules-mode-global/style.css b/test/cases/simple-css-modules-mode-global/style.css new file mode 100644 index 00000000..ca57f5fe --- /dev/null +++ b/test/cases/simple-css-modules-mode-global/style.css @@ -0,0 +1,11 @@ +.a { + background: red; +} + +:local(.b) { + color: green; +} + +:global(.c) { + color: blue; +} diff --git a/test/cases/simple-css-modules-mode-global/webpack.config.js b/test/cases/simple-css-modules-mode-global/webpack.config.js new file mode 100644 index 00000000..23768a7a --- /dev/null +++ b/test/cases/simple-css-modules-mode-global/webpack.config.js @@ -0,0 +1,29 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + options: { + modules: { + mode: "global", + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/simple-css-modules-mode-local-output-module/expected/main.css b/test/cases/simple-css-modules-mode-local-output-module/expected/main.css new file mode 100644 index 00000000..a296d763 --- /dev/null +++ b/test/cases/simple-css-modules-mode-local-output-module/expected/main.css @@ -0,0 +1,12 @@ +.foo__style__a { + background: red; +} + +.foo__style__b { + color: green; +} + +.c { + color: blue; +} + diff --git a/test/cases/simple-css-modules-mode-local-output-module/index.js b/test/cases/simple-css-modules-mode-local-output-module/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/simple-css-modules-mode-local-output-module/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/simple-css-modules-mode-local-output-module/style.css b/test/cases/simple-css-modules-mode-local-output-module/style.css new file mode 100644 index 00000000..ca57f5fe --- /dev/null +++ b/test/cases/simple-css-modules-mode-local-output-module/style.css @@ -0,0 +1,11 @@ +.a { + background: red; +} + +:local(.b) { + color: green; +} + +:global(.c) { + color: blue; +} diff --git a/test/cases/simple-css-modules-mode-local-output-module/webpack.config.js b/test/cases/simple-css-modules-mode-local-output-module/webpack.config.js new file mode 100644 index 00000000..fc1c7054 --- /dev/null +++ b/test/cases/simple-css-modules-mode-local-output-module/webpack.config.js @@ -0,0 +1,35 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + options: { + modules: { + mode: "local", + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, + output: { + module: true, + }, + experiments: { + outputModule: true, + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/simple-css-modules-mode-local/expected/main.css b/test/cases/simple-css-modules-mode-local/expected/main.css new file mode 100644 index 00000000..a296d763 --- /dev/null +++ b/test/cases/simple-css-modules-mode-local/expected/main.css @@ -0,0 +1,12 @@ +.foo__style__a { + background: red; +} + +.foo__style__b { + color: green; +} + +.c { + color: blue; +} + diff --git a/test/cases/simple-css-modules-mode-local/index.js b/test/cases/simple-css-modules-mode-local/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/simple-css-modules-mode-local/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/simple-css-modules-mode-local/style.css b/test/cases/simple-css-modules-mode-local/style.css new file mode 100644 index 00000000..ca57f5fe --- /dev/null +++ b/test/cases/simple-css-modules-mode-local/style.css @@ -0,0 +1,11 @@ +.a { + background: red; +} + +:local(.b) { + color: green; +} + +:global(.c) { + color: blue; +} diff --git a/test/cases/simple-css-modules-mode-local/webpack.config.js b/test/cases/simple-css-modules-mode-local/webpack.config.js new file mode 100644 index 00000000..9c4114d9 --- /dev/null +++ b/test/cases/simple-css-modules-mode-local/webpack.config.js @@ -0,0 +1,29 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + options: { + modules: { + mode: "local", + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/simple-css-modules-mode-pure/expected/main.css b/test/cases/simple-css-modules-mode-pure/expected/main.css new file mode 100644 index 00000000..11f88961 --- /dev/null +++ b/test/cases/simple-css-modules-mode-pure/expected/main.css @@ -0,0 +1,4 @@ +.foo__style__a { + background: red; +} + diff --git a/test/cases/simple-css-modules-mode-pure/index.js b/test/cases/simple-css-modules-mode-pure/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/simple-css-modules-mode-pure/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/simple-css-modules-mode-pure/style.css b/test/cases/simple-css-modules-mode-pure/style.css new file mode 100644 index 00000000..9cad053c --- /dev/null +++ b/test/cases/simple-css-modules-mode-pure/style.css @@ -0,0 +1,3 @@ +.a { + background: red; +} diff --git a/test/cases/simple-css-modules-mode-pure/webpack.config.js b/test/cases/simple-css-modules-mode-pure/webpack.config.js new file mode 100644 index 00000000..f033e9e2 --- /dev/null +++ b/test/cases/simple-css-modules-mode-pure/webpack.config.js @@ -0,0 +1,29 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + options: { + modules: { + mode: "pure", + localIdentName: "foo__[name]__[local]", + }, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/simple-es-module-syntax/expected/main.css b/test/cases/simple-es-module-syntax/expected/main.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/simple-es-module-syntax/expected/main.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/simple-es-module-syntax/index.js b/test/cases/simple-es-module-syntax/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/simple-es-module-syntax/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/simple-es-module-syntax/style.css b/test/cases/simple-es-module-syntax/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/simple-es-module-syntax/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/simple-es-module-syntax/webpack.config.js b/test/cases/simple-es-module-syntax/webpack.config.js new file mode 100644 index 00000000..8b31439a --- /dev/null +++ b/test/cases/simple-es-module-syntax/webpack.config.js @@ -0,0 +1,25 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + Self.loader, + { + loader: "css-loader", + // TODO Uncomment after `css-loader` release the `esModule` option + // options: { esModule: true }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/simple-multiple/a.css b/test/cases/simple-multiple/a.css index 31fc5b8a..67ce83e4 100644 --- a/test/cases/simple-multiple/a.css +++ b/test/cases/simple-multiple/a.css @@ -1 +1,3 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/simple-multiple/b.css b/test/cases/simple-multiple/b.css index 56af6df5..90439bac 100644 --- a/test/cases/simple-multiple/b.css +++ b/test/cases/simple-multiple/b.css @@ -1 +1,3 @@ -body { background: green; } +body { + background: green; +} diff --git a/test/cases/simple-multiple/expected/main.css b/test/cases/simple-multiple/expected/main.css index f17305d1..ef78f8b7 100644 --- a/test/cases/simple-multiple/expected/main.css +++ b/test/cases/simple-multiple/expected/main.css @@ -1,4 +1,8 @@ -body { background: red; } +body { + background: red; +} -body { background: green; } +body { + background: green; +} diff --git a/test/cases/simple-multiple/index.js b/test/cases/simple-multiple/index.js index a0ec7954..5337afb9 100644 --- a/test/cases/simple-multiple/index.js +++ b/test/cases/simple-multiple/index.js @@ -1,2 +1,2 @@ -import './a.css'; -import './b.css'; +import "./a.css"; +import "./b.css"; diff --git a/test/cases/simple-multiple/webpack.config.js b/test/cases/simple-multiple/webpack.config.js index a22ebdad..cf55c08c 100644 --- a/test/cases/simple-multiple/webpack.config.js +++ b/test/cases/simple-multiple/webpack.config.js @@ -1,21 +1,18 @@ -const Self = require('../../../'); +import Self from "../../../src"; module.exports = { - entry: './index.js', + entry: "./index.js", module: { rules: [ { test: /\.css$/, - use: [ - Self.loader, - 'css-loader', - ], + use: [Self.loader, "css-loader"], }, ], }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", }), ], }; diff --git a/test/cases/simple/expected/main.css b/test/cases/simple/expected/main.css index aea53e43..cebc5c1c 100644 --- a/test/cases/simple/expected/main.css +++ b/test/cases/simple/expected/main.css @@ -1,2 +1,4 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/simple/index.js b/test/cases/simple/index.js index aa3357bf..4fe51c72 100644 --- a/test/cases/simple/index.js +++ b/test/cases/simple/index.js @@ -1 +1 @@ -import './style.css'; +import "./style.css"; diff --git a/test/cases/simple/style.css b/test/cases/simple/style.css index 31fc5b8a..67ce83e4 100644 --- a/test/cases/simple/style.css +++ b/test/cases/simple/style.css @@ -1 +1,3 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/simple/webpack.config.js b/test/cases/simple/webpack.config.js index a22ebdad..cf55c08c 100644 --- a/test/cases/simple/webpack.config.js +++ b/test/cases/simple/webpack.config.js @@ -1,21 +1,18 @@ -const Self = require('../../../'); +import Self from "../../../src"; module.exports = { - entry: './index.js', + entry: "./index.js", module: { rules: [ { test: /\.css$/, - use: [ - Self.loader, - 'css-loader', - ], + use: [Self.loader, "css-loader"], }, ], }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", }), ], }; diff --git a/test/cases/source-map/expected/main.css b/test/cases/source-map/expected/main.css new file mode 100644 index 00000000..8f8cf968 --- /dev/null +++ b/test/cases/source-map/expected/main.css @@ -0,0 +1,6 @@ +body { + background: red; +} + + +/*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/test/cases/source-map/index.js b/test/cases/source-map/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/source-map/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/source-map/style.css b/test/cases/source-map/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/source-map/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/source-map/webpack.config.js b/test/cases/source-map/webpack.config.js new file mode 100644 index 00000000..38240d39 --- /dev/null +++ b/test/cases/source-map/webpack.config.js @@ -0,0 +1,29 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + devtool: "source-map", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + sourceMap: true, + }, + }, + ], + }, + ], + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/split-chunks-all/a.js b/test/cases/split-chunks-all/a.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/split-chunks-all/a.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/split-chunks-all/b.js b/test/cases/split-chunks-all/b.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/split-chunks-all/b.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/split-chunks-all/expected/2.css b/test/cases/split-chunks-all/expected/2.css new file mode 100644 index 00000000..cebc5c1c --- /dev/null +++ b/test/cases/split-chunks-all/expected/2.css @@ -0,0 +1,4 @@ +body { + background: red; +} + diff --git a/test/cases/split-chunks-all/expected/2.js b/test/cases/split-chunks-all/expected/2.js new file mode 100644 index 00000000..c8d4dd4f --- /dev/null +++ b/test/cases/split-chunks-all/expected/2.js @@ -0,0 +1 @@ +MISSING diff --git a/test/cases/split-chunks-all/index.js b/test/cases/split-chunks-all/index.js new file mode 100644 index 00000000..4fe51c72 --- /dev/null +++ b/test/cases/split-chunks-all/index.js @@ -0,0 +1 @@ +import "./style.css"; diff --git a/test/cases/split-chunks-all/style.css b/test/cases/split-chunks-all/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/split-chunks-all/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/split-chunks-all/webpack.config.js b/test/cases/split-chunks-all/webpack.config.js new file mode 100644 index 00000000..f57c93a3 --- /dev/null +++ b/test/cases/split-chunks-all/webpack.config.js @@ -0,0 +1,28 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + a: "./a.js", + b: "./b.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + styles: { + type: "css/mini-extract", + chunks: "all", + enforce: true, + }, + }, + }, + }, + plugins: [new Self()], +}; diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.css new file mode 100644 index 00000000..f3292008 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.css @@ -0,0 +1,3 @@ +.class_a { + background: red; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.js b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.js new file mode 100644 index 00000000..4ddb75ee --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/a.js @@ -0,0 +1,5 @@ +import "./a.css"; + +import(/* webpackChunkName: "common" */ "./common"); + +import(/* webpackChunkName: "comp1" */ "./components/comp1"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.css new file mode 100644 index 00000000..49970958 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.css @@ -0,0 +1,3 @@ +.class_b { + background: red; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.js b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.js new file mode 100644 index 00000000..887b900f --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/b.js @@ -0,0 +1,5 @@ +import "./b.css"; + +import(/* webpackChunkName: "common" */ "./common"); + +import(/* webpackChunkName: "comp2" */ "./components/comp2"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.css new file mode 100644 index 00000000..ff488448 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.css @@ -0,0 +1,3 @@ +.common { + color: red; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.js b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.js new file mode 100644 index 00000000..3b529e8a --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/common.js @@ -0,0 +1 @@ +import "./common.css"; diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.css new file mode 100644 index 00000000..87de0008 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.css @@ -0,0 +1,3 @@ +body { + background-color: yellow; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.js b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.js new file mode 100644 index 00000000..1310d883 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp1.js @@ -0,0 +1,3 @@ +import "./comp1.css"; + +import(/* webpackChunkName: "common" */ "../common"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.css new file mode 100644 index 00000000..9d9d772f --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.css @@ -0,0 +1,3 @@ +body { + background-color: green; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.js b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.js new file mode 100644 index 00000000..06e9cbbb --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/components/comp2.js @@ -0,0 +1,3 @@ +import "./comp2.css"; + +import(/* webpackChunkName: "common" */ "../common"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/a/index.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/a/index.css new file mode 100644 index 00000000..9629618e --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/a/index.css @@ -0,0 +1,4 @@ +.class_a { + background: red; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/b/index.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/b/index.css new file mode 100644 index 00000000..999b8411 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/b/index.css @@ -0,0 +1,4 @@ +.class_b { + background: red; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/common/index.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/common/index.css new file mode 100644 index 00000000..9a9d5c60 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/common/index.css @@ -0,0 +1,4 @@ +.common { + color: red; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp1/index.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp1/index.css new file mode 100644 index 00000000..7f9729ec --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp1/index.css @@ -0,0 +1,4 @@ +body { + background-color: yellow; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp2/index.css b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp2/index.css new file mode 100644 index 00000000..cefdf104 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/expected/comp2/index.css @@ -0,0 +1,4 @@ +body { + background-color: green; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/webpack.config.js b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/webpack.config.js new file mode 100644 index 00000000..7ff01b86 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk-and-inside-dir/webpack.config.js @@ -0,0 +1,42 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + a: "./a.js", + b: "./b.js", + }, + output: { + filename: "[name]/index.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + aStyles: { + type: "css/mini-extract", + name: "a", + chunks: (chunk) => chunk.name === "a", + enforce: true, + }, + bStyles: { + type: "css/mini-extract", + name: "b", + chunks: (chunk) => chunk.name === "b", + enforce: true, + }, + }, + }, + }, + plugins: [ + new Self({ + filename: "[name]/index.css", + }), + ], +}; diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/a.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/a.css new file mode 100644 index 00000000..f3292008 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/a.css @@ -0,0 +1,3 @@ +.class_a { + background: red; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/a.js b/test/cases/split-chunks-based-on-entry-with-common-chunk/a.js new file mode 100644 index 00000000..4ddb75ee --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/a.js @@ -0,0 +1,5 @@ +import "./a.css"; + +import(/* webpackChunkName: "common" */ "./common"); + +import(/* webpackChunkName: "comp1" */ "./components/comp1"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/b.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/b.css new file mode 100644 index 00000000..49970958 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/b.css @@ -0,0 +1,3 @@ +.class_b { + background: red; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/b.js b/test/cases/split-chunks-based-on-entry-with-common-chunk/b.js new file mode 100644 index 00000000..887b900f --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/b.js @@ -0,0 +1,5 @@ +import "./b.css"; + +import(/* webpackChunkName: "common" */ "./common"); + +import(/* webpackChunkName: "comp2" */ "./components/comp2"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/common.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/common.css new file mode 100644 index 00000000..ff488448 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/common.css @@ -0,0 +1,3 @@ +.common { + color: red; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/common.js b/test/cases/split-chunks-based-on-entry-with-common-chunk/common.js new file mode 100644 index 00000000..3b529e8a --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/common.js @@ -0,0 +1 @@ +import "./common.css"; diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.css new file mode 100644 index 00000000..87de0008 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.css @@ -0,0 +1,3 @@ +body { + background-color: yellow; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.js b/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.js new file mode 100644 index 00000000..1310d883 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp1.js @@ -0,0 +1,3 @@ +import "./comp1.css"; + +import(/* webpackChunkName: "common" */ "../common"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.css new file mode 100644 index 00000000..9d9d772f --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.css @@ -0,0 +1,3 @@ +body { + background-color: green; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.js b/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.js new file mode 100644 index 00000000..06e9cbbb --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/components/comp2.js @@ -0,0 +1,3 @@ +import "./comp2.css"; + +import(/* webpackChunkName: "common" */ "../common"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/common.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/common.css new file mode 100644 index 00000000..9a9d5c60 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/common.css @@ -0,0 +1,4 @@ +.common { + color: red; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp1.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp1.css new file mode 100644 index 00000000..7f9729ec --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp1.css @@ -0,0 +1,4 @@ +body { + background-color: yellow; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp2.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp2.css new file mode 100644 index 00000000..cefdf104 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/comp2.css @@ -0,0 +1,4 @@ +body { + background-color: green; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_a.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_a.css new file mode 100644 index 00000000..9629618e --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_a.css @@ -0,0 +1,4 @@ +.class_a { + background: red; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_b.css b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_b.css new file mode 100644 index 00000000..999b8411 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/expected/styles_b.css @@ -0,0 +1,4 @@ +.class_b { + background: red; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-chunk/webpack.config.js b/test/cases/split-chunks-based-on-entry-with-common-chunk/webpack.config.js new file mode 100644 index 00000000..507bea5d --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-chunk/webpack.config.js @@ -0,0 +1,35 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + a: "./a.js", + b: "./b.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + aStyles: { + type: "css/mini-extract", + name: "styles_a", + chunks: (chunk) => chunk.name === "a", + enforce: true, + }, + bStyles: { + type: "css/mini-extract", + name: "styles_b", + chunks: (chunk) => chunk.name === "b", + enforce: true, + }, + }, + }, + }, + plugins: [new Self()], +}; diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.css b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.css new file mode 100644 index 00000000..f3292008 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.css @@ -0,0 +1,3 @@ +.class_a { + background: red; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.js b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.js new file mode 100644 index 00000000..0bfb08d3 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.js @@ -0,0 +1,4 @@ +import "./common.css"; +import "./a.css"; + +import(/* webpackChunkName: "comp1" */ "./components/comp1"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.css b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.css new file mode 100644 index 00000000..49970958 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.css @@ -0,0 +1,3 @@ +.class_b { + background: red; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.js b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.js new file mode 100644 index 00000000..4b76a9ca --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.js @@ -0,0 +1,4 @@ +import "./common.css"; +import "./b.css"; + +import(/* webpackChunkName: "comp2" */ "./components/comp2"); diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/common.css b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/common.css new file mode 100644 index 00000000..71d37542 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/common.css @@ -0,0 +1,3 @@ +.common { + background: red; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.css b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.css new file mode 100644 index 00000000..87de0008 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.css @@ -0,0 +1,3 @@ +body { + background-color: yellow; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.js b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.js new file mode 100644 index 00000000..d9122966 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.js @@ -0,0 +1 @@ +import "./comp1.css"; diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.css b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.css new file mode 100644 index 00000000..9d9d772f --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.css @@ -0,0 +1,3 @@ +body { + background-color: green; +} diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.js b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.js new file mode 100644 index 00000000..232dd5bd --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.js @@ -0,0 +1 @@ +import "./comp2.css"; diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp1.css b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp1.css new file mode 100644 index 00000000..7f9729ec --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp1.css @@ -0,0 +1,4 @@ +body { + background-color: yellow; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp2.css b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp2.css new file mode 100644 index 00000000..cefdf104 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp2.css @@ -0,0 +1,4 @@ +body { + background-color: green; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_a.css b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_a.css new file mode 100644 index 00000000..1682f548 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_a.css @@ -0,0 +1,8 @@ +.common { + background: red; +} + +.class_a { + background: red; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_b.css b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_b.css new file mode 100644 index 00000000..5c86ca87 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_b.css @@ -0,0 +1,8 @@ +.common { + background: red; +} + +.class_b { + background: red; +} + diff --git a/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.config.js b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.config.js new file mode 100644 index 00000000..507bea5d --- /dev/null +++ b/test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.config.js @@ -0,0 +1,35 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + a: "./a.js", + b: "./b.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + aStyles: { + type: "css/mini-extract", + name: "styles_a", + chunks: (chunk) => chunk.name === "a", + enforce: true, + }, + bStyles: { + type: "css/mini-extract", + name: "styles_b", + chunks: (chunk) => chunk.name === "b", + enforce: true, + }, + }, + }, + }, + plugins: [new Self()], +}; diff --git a/test/cases/split-chunks-based-on-entry/a.css b/test/cases/split-chunks-based-on-entry/a.css new file mode 100644 index 00000000..f3292008 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/a.css @@ -0,0 +1,3 @@ +.class_a { + background: red; +} diff --git a/test/cases/split-chunks-based-on-entry/a.js b/test/cases/split-chunks-based-on-entry/a.js new file mode 100644 index 00000000..0c13bc98 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/a.js @@ -0,0 +1,3 @@ +import "./a.css"; + +import(/* webpackChunkName: "comp1" */ "./components/comp1"); diff --git a/test/cases/split-chunks-based-on-entry/b.css b/test/cases/split-chunks-based-on-entry/b.css new file mode 100644 index 00000000..49970958 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/b.css @@ -0,0 +1,3 @@ +.class_b { + background: red; +} diff --git a/test/cases/split-chunks-based-on-entry/b.js b/test/cases/split-chunks-based-on-entry/b.js new file mode 100644 index 00000000..c3f9e8ec --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/b.js @@ -0,0 +1,3 @@ +import "./b.css"; + +import(/* webpackChunkName: "comp2" */ "./components/comp2"); diff --git a/test/cases/split-chunks-based-on-entry/components/comp1.css b/test/cases/split-chunks-based-on-entry/components/comp1.css new file mode 100644 index 00000000..87de0008 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/components/comp1.css @@ -0,0 +1,3 @@ +body { + background-color: yellow; +} diff --git a/test/cases/split-chunks-based-on-entry/components/comp1.js b/test/cases/split-chunks-based-on-entry/components/comp1.js new file mode 100644 index 00000000..d9122966 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/components/comp1.js @@ -0,0 +1 @@ +import "./comp1.css"; diff --git a/test/cases/split-chunks-based-on-entry/components/comp2.css b/test/cases/split-chunks-based-on-entry/components/comp2.css new file mode 100644 index 00000000..9d9d772f --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/components/comp2.css @@ -0,0 +1,3 @@ +body { + background-color: green; +} diff --git a/test/cases/split-chunks-based-on-entry/components/comp2.js b/test/cases/split-chunks-based-on-entry/components/comp2.js new file mode 100644 index 00000000..232dd5bd --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/components/comp2.js @@ -0,0 +1 @@ +import "./comp2.css"; diff --git a/test/cases/split-chunks-based-on-entry/expected/comp1.css b/test/cases/split-chunks-based-on-entry/expected/comp1.css new file mode 100644 index 00000000..7f9729ec --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/expected/comp1.css @@ -0,0 +1,4 @@ +body { + background-color: yellow; +} + diff --git a/test/cases/split-chunks-based-on-entry/expected/comp2.css b/test/cases/split-chunks-based-on-entry/expected/comp2.css new file mode 100644 index 00000000..cefdf104 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/expected/comp2.css @@ -0,0 +1,4 @@ +body { + background-color: green; +} + diff --git a/test/cases/split-chunks-based-on-entry/expected/styles_a.css b/test/cases/split-chunks-based-on-entry/expected/styles_a.css new file mode 100644 index 00000000..9629618e --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/expected/styles_a.css @@ -0,0 +1,4 @@ +.class_a { + background: red; +} + diff --git a/test/cases/split-chunks-based-on-entry/expected/styles_b.css b/test/cases/split-chunks-based-on-entry/expected/styles_b.css new file mode 100644 index 00000000..999b8411 --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/expected/styles_b.css @@ -0,0 +1,4 @@ +.class_b { + background: red; +} + diff --git a/test/cases/split-chunks-based-on-entry/webpack.config.js b/test/cases/split-chunks-based-on-entry/webpack.config.js new file mode 100644 index 00000000..507bea5d --- /dev/null +++ b/test/cases/split-chunks-based-on-entry/webpack.config.js @@ -0,0 +1,35 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + a: "./a.js", + b: "./b.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + aStyles: { + type: "css/mini-extract", + name: "styles_a", + chunks: (chunk) => chunk.name === "a", + enforce: true, + }, + bStyles: { + type: "css/mini-extract", + name: "styles_b", + chunks: (chunk) => chunk.name === "b", + enforce: true, + }, + }, + }, + }, + plugins: [new Self()], +}; diff --git a/test/cases/split-chunks-no-vendor/expected/bundle.css b/test/cases/split-chunks-no-vendor/expected/bundle.css new file mode 100644 index 00000000..02961362 --- /dev/null +++ b/test/cases/split-chunks-no-vendor/expected/bundle.css @@ -0,0 +1,13 @@ +/* This could be bootstrap.css */ +body { + background: green; +} + +body { + background: red; +} + +.async { + color: red; +} + diff --git a/test/cases/split-chunks-no-vendor/index.js b/test/cases/split-chunks-no-vendor/index.js new file mode 100644 index 00000000..76095617 --- /dev/null +++ b/test/cases/split-chunks-no-vendor/index.js @@ -0,0 +1,8 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import "bootstrap/bootstrap.css"; +import "./style.css"; + +// eslint-disable-next-line import/first +import "package/index"; + +import("other-css/other.css"); diff --git a/test/cases/split-chunks-no-vendor/node_modules/bootstrap/bootstrap.css b/test/cases/split-chunks-no-vendor/node_modules/bootstrap/bootstrap.css new file mode 100644 index 00000000..223c4d00 --- /dev/null +++ b/test/cases/split-chunks-no-vendor/node_modules/bootstrap/bootstrap.css @@ -0,0 +1,4 @@ +/* This could be bootstrap.css */ +body { + background: green; +} diff --git a/test/cases/split-chunks-no-vendor/node_modules/other-css/other.css b/test/cases/split-chunks-no-vendor/node_modules/other-css/other.css new file mode 100644 index 00000000..b1645094 --- /dev/null +++ b/test/cases/split-chunks-no-vendor/node_modules/other-css/other.css @@ -0,0 +1,3 @@ +.async { + color: red; +} diff --git a/test/cases/split-chunks-no-vendor/node_modules/package/index.js b/test/cases/split-chunks-no-vendor/node_modules/package/index.js new file mode 100644 index 00000000..a2831caa --- /dev/null +++ b/test/cases/split-chunks-no-vendor/node_modules/package/index.js @@ -0,0 +1 @@ +console.log("HERE"); diff --git a/test/cases/split-chunks-no-vendor/style.css b/test/cases/split-chunks-no-vendor/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/split-chunks-no-vendor/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/split-chunks-no-vendor/webpack.config.js b/test/cases/split-chunks-no-vendor/webpack.config.js new file mode 100644 index 00000000..b82b0ef0 --- /dev/null +++ b/test/cases/split-chunks-no-vendor/webpack.config.js @@ -0,0 +1,40 @@ +import Self from "../../../src"; + +module.exports = { + entry: "./index.js", + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + chunks: "all", + cacheGroups: { + default: false, + vendors: false, + vendor: { + test: /[\\/]node_modules[\\/]/, + name: "vendor", + chunks: "all", + enforce: true, + }, + styles: { + name: "bundle", + type: "css/mini-extract", + chunks: "all", + priority: 100, + enforce: true, + }, + }, + }, + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/split-chunks-recursiveIssuer/a.css b/test/cases/split-chunks-recursiveIssuer/a.css new file mode 100644 index 00000000..f3292008 --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/a.css @@ -0,0 +1,3 @@ +.class_a { + background: red; +} diff --git a/test/cases/split-chunks-recursiveIssuer/a.js b/test/cases/split-chunks-recursiveIssuer/a.js new file mode 100644 index 00000000..0c13bc98 --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/a.js @@ -0,0 +1,3 @@ +import "./a.css"; + +import(/* webpackChunkName: "comp1" */ "./components/comp1"); diff --git a/test/cases/split-chunks-recursiveIssuer/b.css b/test/cases/split-chunks-recursiveIssuer/b.css new file mode 100644 index 00000000..49970958 --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/b.css @@ -0,0 +1,3 @@ +.class_b { + background: red; +} diff --git a/test/cases/split-chunks-recursiveIssuer/b.js b/test/cases/split-chunks-recursiveIssuer/b.js new file mode 100644 index 00000000..c3f9e8ec --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/b.js @@ -0,0 +1,3 @@ +import "./b.css"; + +import(/* webpackChunkName: "comp2" */ "./components/comp2"); diff --git a/test/cases/split-chunks-recursiveIssuer/components/comp1.css b/test/cases/split-chunks-recursiveIssuer/components/comp1.css new file mode 100644 index 00000000..87de0008 --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/components/comp1.css @@ -0,0 +1,3 @@ +body { + background-color: yellow; +} diff --git a/test/cases/split-chunks-recursiveIssuer/components/comp1.js b/test/cases/split-chunks-recursiveIssuer/components/comp1.js new file mode 100644 index 00000000..d9122966 --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/components/comp1.js @@ -0,0 +1 @@ +import "./comp1.css"; diff --git a/test/cases/split-chunks-recursiveIssuer/components/comp2.css b/test/cases/split-chunks-recursiveIssuer/components/comp2.css new file mode 100644 index 00000000..9d9d772f --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/components/comp2.css @@ -0,0 +1,3 @@ +body { + background-color: green; +} diff --git a/test/cases/split-chunks-recursiveIssuer/components/comp2.js b/test/cases/split-chunks-recursiveIssuer/components/comp2.js new file mode 100644 index 00000000..232dd5bd --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/components/comp2.js @@ -0,0 +1 @@ +import "./comp2.css"; diff --git a/test/cases/split-chunks-recursiveIssuer/expected/styles_a.css b/test/cases/split-chunks-recursiveIssuer/expected/styles_a.css new file mode 100644 index 00000000..bf5851e6 --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/expected/styles_a.css @@ -0,0 +1,8 @@ +.class_a { + background: red; +} + +body { + background-color: yellow; +} + diff --git a/test/cases/split-chunks-recursiveIssuer/expected/styles_b.css b/test/cases/split-chunks-recursiveIssuer/expected/styles_b.css new file mode 100644 index 00000000..312d2fe5 --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/expected/styles_b.css @@ -0,0 +1,8 @@ +.class_b { + background: red; +} + +body { + background-color: green; +} + diff --git a/test/cases/split-chunks-recursiveIssuer/webpack.config.js b/test/cases/split-chunks-recursiveIssuer/webpack.config.js new file mode 100644 index 00000000..357f8bcb --- /dev/null +++ b/test/cases/split-chunks-recursiveIssuer/webpack.config.js @@ -0,0 +1,55 @@ +import Self from "../../../src"; + +function recursiveIssuer(m, c) { + const issuer = c.moduleGraph.getIssuer(m); + + if (issuer) { + return recursiveIssuer(issuer, c); + } + + const chunks = c.chunkGraph.getModuleChunks(m); + + for (const chunk of chunks) { + return chunk.name; + } + + return false; +} + +module.exports = { + entry: { + a: "./a.js", + b: "./b.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + aStyles: { + name: "styles_a", + test: (m, c, entry = "a") => + m.constructor.name === "CssModule" && + recursiveIssuer(m, c) === entry, + chunks: "all", + enforce: true, + }, + bStyles: { + name: "styles_b", + test: (m, c, entry = "b") => + m.constructor.name === "CssModule" && + recursiveIssuer(m, c) === entry, + chunks: "all", + enforce: true, + }, + }, + }, + }, + plugins: [new Self()], +}; diff --git a/test/cases/split-chunks-single/a.css b/test/cases/split-chunks-single/a.css new file mode 100644 index 00000000..5dfbbae2 --- /dev/null +++ b/test/cases/split-chunks-single/a.css @@ -0,0 +1,3 @@ +body { + content: "a"; +} diff --git a/test/cases/split-chunks-single/b.css b/test/cases/split-chunks-single/b.css new file mode 100644 index 00000000..9c96da60 --- /dev/null +++ b/test/cases/split-chunks-single/b.css @@ -0,0 +1,3 @@ +body { + content: "b"; +} diff --git a/test/cases/split-chunks-single/c.css b/test/cases/split-chunks-single/c.css new file mode 100644 index 00000000..a8b60b1e --- /dev/null +++ b/test/cases/split-chunks-single/c.css @@ -0,0 +1,3 @@ +body { + content: "c"; +} diff --git a/test/cases/split-chunks-single/chunk1.js b/test/cases/split-chunks-single/chunk1.js new file mode 100644 index 00000000..eb558470 --- /dev/null +++ b/test/cases/split-chunks-single/chunk1.js @@ -0,0 +1,2 @@ +import "./c.css"; +import "./d.css"; diff --git a/test/cases/split-chunks-single/chunk2.js b/test/cases/split-chunks-single/chunk2.js new file mode 100644 index 00000000..7254062a --- /dev/null +++ b/test/cases/split-chunks-single/chunk2.js @@ -0,0 +1,2 @@ +import "./d.css"; +import "./h.css"; diff --git a/test/cases/split-chunks-single/d.css b/test/cases/split-chunks-single/d.css new file mode 100644 index 00000000..28b0c8a2 --- /dev/null +++ b/test/cases/split-chunks-single/d.css @@ -0,0 +1,3 @@ +body { + content: "d"; +} diff --git a/test/cases/split-chunks-single/e1.css b/test/cases/split-chunks-single/e1.css new file mode 100644 index 00000000..06e4b188 --- /dev/null +++ b/test/cases/split-chunks-single/e1.css @@ -0,0 +1,3 @@ +body { + content: "e1"; +} diff --git a/test/cases/split-chunks-single/e2.css b/test/cases/split-chunks-single/e2.css new file mode 100644 index 00000000..3bc4fc4e --- /dev/null +++ b/test/cases/split-chunks-single/e2.css @@ -0,0 +1,3 @@ +body { + content: "e2"; +} diff --git a/test/cases/split-chunks-single/entry1.js b/test/cases/split-chunks-single/entry1.js new file mode 100644 index 00000000..a9eb31cb --- /dev/null +++ b/test/cases/split-chunks-single/entry1.js @@ -0,0 +1,9 @@ +import "./a.css"; +import "./e1.css"; +import "./e2.css"; +import "./f.css"; + +/* eslint-disable-next-line no-unused-expressions */ +import("./chunk1"); +/* eslint-disable-next-line no-unused-expressions */ +import("./chunk2"); diff --git a/test/cases/split-chunks-single/entry2.js b/test/cases/split-chunks-single/entry2.js new file mode 100644 index 00000000..ac99cd5c --- /dev/null +++ b/test/cases/split-chunks-single/entry2.js @@ -0,0 +1,5 @@ +import "./b.css"; +import "./e2.css"; +import "./e1.css"; +import "./g.css"; +import "./h.css"; diff --git a/test/cases/split-chunks-single/expected/styles.css b/test/cases/split-chunks-single/expected/styles.css new file mode 100644 index 00000000..35cc00ff --- /dev/null +++ b/test/cases/split-chunks-single/expected/styles.css @@ -0,0 +1,36 @@ +body { + content: "a"; +} + +body { + content: "b"; +} + +body { + content: "c"; +} + +body { + content: "d"; +} + +body { + content: "e1"; +} + +body { + content: "e2"; +} + +body { + content: "f"; +} + +body { + content: "g"; +} + +body { + content: "h"; +} + diff --git a/test/cases/split-chunks-single/f.css b/test/cases/split-chunks-single/f.css new file mode 100644 index 00000000..e99da47e --- /dev/null +++ b/test/cases/split-chunks-single/f.css @@ -0,0 +1,3 @@ +body { + content: "f"; +} diff --git a/test/cases/split-chunks-single/g.css b/test/cases/split-chunks-single/g.css new file mode 100644 index 00000000..01e55e27 --- /dev/null +++ b/test/cases/split-chunks-single/g.css @@ -0,0 +1,3 @@ +body { + content: "g"; +} diff --git a/test/cases/split-chunks-single/h.css b/test/cases/split-chunks-single/h.css new file mode 100644 index 00000000..f1ebf2eb --- /dev/null +++ b/test/cases/split-chunks-single/h.css @@ -0,0 +1,3 @@ +body { + content: "h"; +} diff --git a/test/cases/split-chunks-single/style.css b/test/cases/split-chunks-single/style.css new file mode 100644 index 00000000..67ce83e4 --- /dev/null +++ b/test/cases/split-chunks-single/style.css @@ -0,0 +1,3 @@ +body { + background: red; +} diff --git a/test/cases/split-chunks-single/webpack.config.js b/test/cases/split-chunks-single/webpack.config.js new file mode 100644 index 00000000..0637e600 --- /dev/null +++ b/test/cases/split-chunks-single/webpack.config.js @@ -0,0 +1,33 @@ +import Self from "../../../src"; + +module.exports = { + entry: { + entry1: "./entry1.js", + entry2: "./entry2.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [Self.loader, "css-loader"], + }, + ], + }, + optimization: { + splitChunks: { + cacheGroups: { + styles: { + name: "styles", + chunks: "all", + test: /\.css$/, + enforce: true, + }, + }, + }, + }, + plugins: [ + new Self({ + filename: "[name].css", + }), + ], +}; diff --git a/test/cases/split-chunks/expected/main.css b/test/cases/split-chunks/expected/main.css index aea53e43..cebc5c1c 100644 --- a/test/cases/split-chunks/expected/main.css +++ b/test/cases/split-chunks/expected/main.css @@ -1,2 +1,4 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/split-chunks/expected/vendors~main.css b/test/cases/split-chunks/expected/vendors.css similarity index 100% rename from test/cases/split-chunks/expected/vendors~main.css rename to test/cases/split-chunks/expected/vendors.css diff --git a/test/cases/split-chunks/index.js b/test/cases/split-chunks/index.js index c83e204a..ebec65b9 100644 --- a/test/cases/split-chunks/index.js +++ b/test/cases/split-chunks/index.js @@ -1,2 +1,3 @@ -import 'bootstrap.css'; -import './style.css'; +// eslint-disable-next-line import/no-extraneous-dependencies +import "bootstrap.css"; +import "./style.css"; diff --git a/test/cases/split-chunks/style.css b/test/cases/split-chunks/style.css index 31fc5b8a..67ce83e4 100644 --- a/test/cases/split-chunks/style.css +++ b/test/cases/split-chunks/style.css @@ -1 +1,3 @@ -body { background: red; } +body { + background: red; +} diff --git a/test/cases/split-chunks/webpack.config.js b/test/cases/split-chunks/webpack.config.js index d276ab14..a93e6d17 100644 --- a/test/cases/split-chunks/webpack.config.js +++ b/test/cases/split-chunks/webpack.config.js @@ -1,32 +1,30 @@ -const Self = require('../../../'); +import Self from "../../../src"; module.exports = { - entry: './index.js', + entry: "./index.js", module: { rules: [ { test: /\.css$/, - use: [ - Self.loader, - 'css-loader', - ], + use: [Self.loader, "css-loader"], }, ], }, optimization: { splitChunks: { - chunks: 'all', + chunks: "all", cacheGroups: { vendors: { + name: "vendors", test: /node_modules/, - enforce: true - } - } - } + enforce: true, + }, + }, + }, }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", }), ], }; diff --git a/test/emit-option.test.js b/test/emit-option.test.js new file mode 100644 index 00000000..bd4eef10 --- /dev/null +++ b/test/emit-option.test.js @@ -0,0 +1,483 @@ +/* eslint-env browser */ +import fs from "fs"; +import path from "path"; + +import del from "del"; +import webpack from "webpack"; + +import MiniCssExtractPlugin from "../src"; + +import { + compile, + getCompiler, + getErrors, + getWarnings, + runInJsDom, +} from "./helpers/index"; + +describe("emit option", () => { + it("should work without emit option", async () => { + const compiler = getCompiler( + "style-url.js", + {}, + { + mode: "none", + output: { + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + expect(Object.keys(stats.compilation.assets).sort()).toMatchSnapshot( + "assets", + ); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it('should work when emit option is "true"', async () => { + const compiler = getCompiler( + "style-url.js", + { + emit: true, + }, + { + mode: "none", + output: { + path: path.resolve(__dirname, "../outputs"), + }, + + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + expect(Object.keys(stats.compilation.assets).sort()).toMatchSnapshot( + "assets", + ); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it('should work when emit option is "false"', async () => { + const compiler = getCompiler( + "style-url.js", + { + emit: false, + }, + { + mode: "none", + output: { + path: path.resolve(__dirname, "../outputs"), + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + expect(Object.keys(stats.compilation.assets).sort()).toMatchSnapshot( + "assets", + ); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it('should work with locals when emit option is "false"', async () => { + const compiler = getCompiler( + "locals.js", + {}, + { + output: { + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + emit: false, + }, + }, + { + loader: "css-loader", + options: { + modules: true, + }, + }, + ], + }, + ], + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it('should work with locals and invalidate cache when emit option is "false"', async () => { + const modifyAsset = path.resolve(__dirname, "fixtures", "locals/index.css"); + const modifyAssetContent = fs.readFileSync(modifyAsset); + + class AssetsModifyPlugin { + constructor(options = {}) { + this.options = options; + } + + apply(compiler) { + compiler.hooks.emit.tapAsync( + "AssetsModifyPlugin", + (compilation, callback) => { + const newContent = modifyAssetContent + .toString() + .replace(/foo/i, "foo-bar"); + fs.writeFileSync(this.options.file, newContent); + + callback(); + }, + ); + } + } + + const outputPath = path.resolve(__dirname, "./js/cache-memory"); + const webpackConfig = { + mode: "development", + context: path.resolve(__dirname, "./fixtures"), + cache: { + type: "memory", + }, + entry: "./locals.js", + output: { + path: outputPath, + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + emit: false, + }, + }, + { + loader: "css-loader", + options: { + modules: true, + }, + }, + ], + }, + ], + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + new AssetsModifyPlugin({ + file: modifyAsset, + }), + ], + }; + + await del([outputPath]); + + const compiler1 = webpack(webpackConfig); + + await new Promise((resolve, reject) => { + compiler1.run((error, stats) => { + if (error) { + reject(error); + + return; + } + + compiler1.close(() => { + expect(Object.keys(stats.compilation.assets).sort()).toMatchSnapshot( + "assets", + ); + expect([...stats.compilation.emittedAssets].sort()).toMatchSnapshot( + "emittedAssets", + ); + runInJsDom("main.js", compiler1, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + + resolve(); + }); + }); + }); + + const compiler2 = webpack(webpackConfig); + + await new Promise((resolve, reject) => { + compiler2.run((error, stats) => { + if (error) { + reject(error); + + return; + } + + compiler2.close(() => { + expect(Object.keys(stats.compilation.assets).sort()).toMatchSnapshot( + "assets", + ); + expect([...stats.compilation.emittedAssets].sort()).toMatchSnapshot( + "emittedAssets", + ); + runInJsDom("main.js", compiler2, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + + resolve(); + }); + }); + }); + + fs.writeFileSync(modifyAsset, modifyAssetContent); + }); + + it('should work with the "memory" cache and disabled "emit" option', async () => { + const outputPath = path.resolve(__dirname, "./js/cache-memory"); + const webpackConfig = { + mode: "development", + context: path.resolve(__dirname, "fixtures"), + cache: { + type: "memory", + }, + output: { + path: outputPath, + }, + entry: "./style-url.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + emit: false, + }, + }, + "css-loader", + ], + }, + { + test: /\.svg$/, + type: "asset/resource", + generator: { + filename: "static/[name][ext][query]", + }, + }, + ], + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }; + + await del([outputPath]); + + const compiler = webpack(webpackConfig); + + await new Promise((resolve, reject) => { + compiler.run((error, stats) => { + if (error) { + reject(error); + + return; + } + + expect(Object.keys(stats.compilation.assets).sort()).toMatchSnapshot( + "assets", + ); + expect([...stats.compilation.emittedAssets].sort()).toMatchSnapshot( + "emittedAssets", + ); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + + resolve(); + }); + }); + + await new Promise((resolve, reject) => { + compiler.run((error, stats) => { + if (error) { + reject(error); + + return; + } + + compiler.close(() => { + expect(Object.keys(stats.compilation.assets).sort()).toMatchSnapshot( + "assets", + ); + expect([...stats.compilation.emittedAssets].sort()).toMatchSnapshot( + "emittedAssets", + ); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + + resolve(); + }); + }); + }); + }); + + it('should invalidate the cache with disabled "emit" option', async () => { + class AssetsModifyPlugin { + constructor(options = {}) { + this.options = options; + } + + apply(compiler) { + compiler.hooks.emit.tapAsync( + "AssetsModifyPlugin", + (compilation, callback) => { + fs.writeFileSync(this.options.file, ".a{color: red;}"); + + callback(); + }, + ); + } + } + + const outputPath = path.resolve(__dirname, "./js/cache-memory"); + const modifyAsset = path.resolve(__dirname, "fixtures", "style-url.css"); + const modifyAssetContent = fs.readFileSync(modifyAsset); + const webpackConfig = { + mode: "development", + context: path.resolve(__dirname, "fixtures"), + cache: { + type: "memory", + }, + output: { + path: outputPath, + }, + entry: "./style-url.js", + module: { + rules: [ + { + test: /\.css$/, + use: [ + { + loader: MiniCssExtractPlugin.loader, + options: { + emit: false, + }, + }, + "css-loader", + ], + }, + { + test: /\.svg$/, + type: "asset/resource", + generator: { + filename: "static/[name][ext][query]", + }, + }, + ], + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + new AssetsModifyPlugin({ + file: modifyAsset, + }), + ], + }; + + await del([outputPath]); + + const compiler1 = webpack(webpackConfig); + + await new Promise((resolve, reject) => { + compiler1.run((error, stats) => { + if (error) { + reject(error); + + return; + } + + compiler1.close(() => { + expect(Object.keys(stats.compilation.assets).sort()).toMatchSnapshot( + "assets", + ); + expect([...stats.compilation.emittedAssets].sort()).toMatchSnapshot( + "emittedAssets", + ); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + + resolve(); + }); + }); + }); + + const compiler2 = webpack(webpackConfig); + + await new Promise((resolve, reject) => { + compiler2.run((error, stats) => { + if (error) { + reject(error); + + return; + } + + compiler2.close(() => { + expect(Object.keys(stats.compilation.assets).sort()).toMatchSnapshot( + "assets", + ); + expect([...stats.compilation.emittedAssets].sort()).toMatchSnapshot( + "emittedAssets", + ); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + + resolve(); + }); + }); + }); + + fs.writeFileSync(modifyAsset, modifyAssetContent); + }); +}); diff --git a/test/enforce-esm.test.js b/test/enforce-esm.test.js new file mode 100644 index 00000000..eed34dbc --- /dev/null +++ b/test/enforce-esm.test.js @@ -0,0 +1,71 @@ +import { compile, getCompiler, source } from "./helpers"; + +describe("ES modules", () => { + it("should enforce esm for empty module without options.esModule", async () => { + expect.assertions(3); + + const compiler = getCompiler( + "./esm.js", + {}, + { + mode: "production", + optimization: { minimize: false }, + }, + ); + const stats = await compile(compiler); + expect(stats.hasErrors()).toBe(false); + const { modules } = stats.toJson({ all: false, modules: true }); + expect( + modules.filter((m) => m.moduleType !== "runtime" && !m.orphan), + ).toHaveLength(2); + expect(source("./simple.css", stats)).toMatchInlineSnapshot(` + "// extracted by mini-css-extract-plugin + export {};" + `); + }); + + it("should enforce esm for empty module with options.esModule", async () => { + expect.assertions(3); + + const compiler = getCompiler( + "./esm.js", + { esModule: true }, + { + mode: "production", + optimization: { minimize: false }, + }, + ); + const stats = await compile(compiler); + expect(stats.hasErrors()).toBe(false); + const { modules } = stats.toJson({ all: false, modules: true }); + expect( + modules.filter((m) => m.moduleType !== "runtime" && !m.orphan), + ).toHaveLength(2); + expect(source("./simple.css", stats)).toMatchInlineSnapshot(` + "// extracted by mini-css-extract-plugin + export {};" + `); + }); + + it('should keep empty module when options.esModule is equal "false"', async () => { + expect.assertions(3); + + const compiler = getCompiler( + "./esm.js", + { esModule: false }, + { + mode: "production", + optimization: { minimize: false }, + }, + ); + const stats = await compile(compiler); + expect(stats.hasErrors()).toBe(false); + const { modules } = stats.toJson({ all: false, modules: true }); + expect( + modules.filter((m) => m.moduleType !== "runtime" && !m.orphan), + ).toHaveLength(2); + expect(source("./simple.css", stats)).toMatchInlineSnapshot( + '"// extracted by mini-css-extract-plugin"', + ); + }); +}); diff --git a/test/fixtures/attributes.js b/test/fixtures/attributes.js new file mode 100644 index 00000000..1b9d3ae6 --- /dev/null +++ b/test/fixtures/attributes.js @@ -0,0 +1,2 @@ +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "simple" */ './simple.css'); diff --git a/test/fixtures/esm.js b/test/fixtures/esm.js new file mode 100644 index 00000000..1a4074dd --- /dev/null +++ b/test/fixtures/esm.js @@ -0,0 +1 @@ +import "./simple.css"; diff --git a/test/fixtures/insert.js b/test/fixtures/insert.js new file mode 100644 index 00000000..1b9d3ae6 --- /dev/null +++ b/test/fixtures/insert.js @@ -0,0 +1,2 @@ +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "simple" */ './simple.css'); diff --git a/test/fixtures/json/data-urls.json b/test/fixtures/json/data-urls.json new file mode 100644 index 00000000..20ddebe2 --- /dev/null +++ b/test/fixtures/json/data-urls.json @@ -0,0 +1,40 @@ +{ + "main": [ + ["example.com", "example.com"], + ["example.com ", "example.com"], + ["example.com.", "example.com"], + ["http://example.com/", "http://example.com/"], + ["http://example.com/", "http://example.com/"], + ["https://example.com/", "https://example.com/"], + ["//example.com", "//example.com"], + ["//example.com:80/", "//example.com:80/"], + ["ftp://example.com:21", "ftp://example.com:21"], + ["http://example.com:5000/", "http://example.com:5000/"], + ["http://example.com/foo/", "http://example.com/foo/"], + ["https://foo.com/https://bar.com", "https://foo.com/https://bar.com"], + ["https://foo.com/https://bar.com/foo//bar", "https://foo.com/https://bar.com/foo//bar"], + ["https://foo.com/http://bar.com", "https://foo.com/http://bar.com"], + ["https://foo.com/http://bar.com/foo//bar", "https://foo.com/http://bar.com/foo//bar"], + ["https://foo.com/%FAIL%/07/94/ca/55.jpg", "https://foo.com/%FAIL%/07/94/ca/55.jpg"], + ["http://example.com/?", "http://example.com/?"], + ["http://example.com/?b=bar&a=foo", "http://example.com/?b=bar&a=foo"], + ["http://example.com/?b=bar//&a=foo", "http://example.com/?b=bar//&a=foo"], + ["//example.com/", "//example.com/"], + ["http://example.com/foo#bar", "http://example.com/foo#bar"], + ["http://example.com/foo/#bar", "http://example.com/foo/#bar"], + ["http://example.com/foo/baz", "http://example.com/foo/baz"], + ["http://example.com/foo/bar/baz", "http://example.com/foo/bar/baz"], + ["http://example.com/bar/baz", "http://example.com/bar/baz"], + ["http://example.com/baz", "http://example.com/baz"], + ["http://example.com/baz/", "http://example.com/baz/"], + ["http://example.com/foo///bar//baz/", "http://example.com/foo///bar//baz/"], + ["sindre://www.sorhus.com/", "sindre://www.sorhus.com/"], + ["sindre://www.sorhus.com/foo/bar", "sindre://www.sorhus.com/foo/bar"], + ["www.example.com", "www.example.com"], + ["sindre://www.sorhus.com", "sindre://www.sorhus.com"], + ["http://www.sorhus.xx--bck1b9a5dre4c/", "http://www.sorhus.xx--bck1b9a5dre4c/"], + ["http://www.www.example.com/", "http://www.www.example.com/"], + ["https://user:password@example.org/", "https://user:password@example.org/"], + ["https://example.com/x", "https://example.com/x"] + ] +} diff --git a/test/fixtures/locals.js b/test/fixtures/locals.js new file mode 100644 index 00000000..bbc09b2f --- /dev/null +++ b/test/fixtures/locals.js @@ -0,0 +1,4 @@ +import './locals/index.css'; +import html from './locals/template.js'; + +document.body.textContent = html; diff --git a/test/fixtures/locals/index.css b/test/fixtures/locals/index.css new file mode 100644 index 00000000..61760a22 --- /dev/null +++ b/test/fixtures/locals/index.css @@ -0,0 +1,11 @@ +.foo { + color: red; +} + +.bar { + color: coral; +} + +.baz { + color: blue; +} diff --git a/test/fixtures/locals/template.js b/test/fixtures/locals/template.js new file mode 100644 index 00000000..ee01804c --- /dev/null +++ b/test/fixtures/locals/template.js @@ -0,0 +1,9 @@ +import css from './index.css'; + +let html = '\n'; + +for (const key in css) { + html += `css.${key}: ${css[key]}\n`; +} + +export default html; diff --git a/test/fixtures/no-nonce.js b/test/fixtures/no-nonce.js new file mode 100644 index 00000000..1b9d3ae6 --- /dev/null +++ b/test/fixtures/no-nonce.js @@ -0,0 +1,2 @@ +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "simple" */ './simple.css'); diff --git a/test/fixtures/nonce.js b/test/fixtures/nonce.js new file mode 100644 index 00000000..f7e89de0 --- /dev/null +++ b/test/fixtures/nonce.js @@ -0,0 +1,4 @@ +__webpack_nonce__ = 'THE_NONCE'; + +/* eslint-disable-next-line no-unused-expressions */ +import(/* webpackChunkName: "simple" */ './simple.css'); diff --git a/test/fixtures/react.svg b/test/fixtures/react.svg new file mode 100644 index 00000000..5b3b22a4 --- /dev/null +++ b/test/fixtures/react.svg @@ -0,0 +1 @@ +logo-on-dark-bg \ No newline at end of file diff --git a/test/fixtures/simple.css b/test/fixtures/simple.css new file mode 100644 index 00000000..a15c877a --- /dev/null +++ b/test/fixtures/simple.css @@ -0,0 +1,3 @@ +.foo { + color: red; +} diff --git a/test/fixtures/simple.js b/test/fixtures/simple.js new file mode 100644 index 00000000..f3ccc56d --- /dev/null +++ b/test/fixtures/simple.js @@ -0,0 +1,3 @@ +import './simple.css'; + +console.log('HERE'); diff --git a/test/fixtures/style-url.css b/test/fixtures/style-url.css new file mode 100644 index 00000000..52c2b3e4 --- /dev/null +++ b/test/fixtures/style-url.css @@ -0,0 +1,4 @@ +body { + background: red; + background-image: url(https://github.com/react.svg); +} diff --git a/test/fixtures/style-url.js b/test/fixtures/style-url.js new file mode 100644 index 00000000..7ee6cb6a --- /dev/null +++ b/test/fixtures/style-url.js @@ -0,0 +1 @@ +import './style-url.css'; diff --git a/test/helpers/compile.js b/test/helpers/compile.js new file mode 100644 index 00000000..a1b05e5c --- /dev/null +++ b/test/helpers/compile.js @@ -0,0 +1,10 @@ +export default (compiler) => + new Promise((resolve, reject) => { + compiler.run((error, stats) => { + if (error) { + return reject(error); + } + + return resolve(stats); + }); + }); diff --git a/test/helpers/getCompiler.js b/test/helpers/getCompiler.js new file mode 100644 index 00000000..505dc441 --- /dev/null +++ b/test/helpers/getCompiler.js @@ -0,0 +1,62 @@ +import path from "path"; + +import { Volume, createFsFromVolume } from "memfs"; +import webpack from "webpack"; + +import MiniCssExtractPlugin from "../../src"; + +export default (fixture, loaderOptions = {}, config = {}) => { + const { outputFileSystem, ...cnfg } = config; + + const fullConfig = { + mode: "development", + devtool: cnfg.devtool || false, + context: path.resolve(__dirname, "../fixtures"), + entry: path.resolve(__dirname, "../fixtures", fixture), + output: { + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + chunkFilename: "[name].chunk.js", + }, + module: { + rules: [ + { + test: /\.css$/i, + rules: [ + { + loader: MiniCssExtractPlugin.loader, + options: loaderOptions || {}, + }, + { + loader: "css-loader", + }, + ], + }, + { + test: /\.svg$/, + type: "asset/resource", + generator: { + filename: "[name][ext]", + }, + }, + ], + }, + plugins: [ + new MiniCssExtractPlugin({ + // Options similar to the same options in webpackOptions.output + // both options are optional + filename: "[name].css", + chunkFilename: "[id].css", + }), + ], + ...cnfg, + }; + + const compiler = webpack(fullConfig); + + compiler.outputFileSystem = !outputFileSystem + ? createFsFromVolume(new Volume()) + : outputFileSystem; + + return compiler; +}; diff --git a/test/helpers/getErrors.js b/test/helpers/getErrors.js new file mode 100644 index 00000000..64e7176c --- /dev/null +++ b/test/helpers/getErrors.js @@ -0,0 +1,3 @@ +import normalizeErrors from "./normalizeErrors"; + +export default (stats) => normalizeErrors(stats.compilation.errors); diff --git a/test/helpers/getWarnings.js b/test/helpers/getWarnings.js new file mode 100644 index 00000000..eee9f107 --- /dev/null +++ b/test/helpers/getWarnings.js @@ -0,0 +1,3 @@ +import normalizeErrors from "./normalizeErrors"; + +export default (stats) => normalizeErrors(stats.compilation.warnings); diff --git a/test/helpers/index.js b/test/helpers/index.js new file mode 100644 index 00000000..0ab5682f --- /dev/null +++ b/test/helpers/index.js @@ -0,0 +1,7 @@ +export { default as compile } from "./compile"; +export { default as getCompiler } from "./getCompiler"; +export { default as runInJsDom } from "./runInJsDom"; +export { default as getWarnings } from "./getWarnings"; +export { default as getErrors } from "./getErrors"; +export { default as source } from "./source"; +export { default as readAsset } from "./readAsset"; diff --git a/test/helpers/normalizeErrors.js b/test/helpers/normalizeErrors.js new file mode 100644 index 00000000..e2269227 --- /dev/null +++ b/test/helpers/normalizeErrors.js @@ -0,0 +1,21 @@ +/** + * @param {string} str string + * @returns {string} string without cwd + */ +function removeCWD(str) { + const isWin = process.platform === "win32"; + let cwd = process.cwd(); + + if (isWin) { + str = str.replace(/\\/g, "/"); + + cwd = cwd.replace(/\\/g, "/"); + } + + return str.replace(new RegExp(cwd, "g"), ""); +} + +export default (errors) => + errors.map((error) => + removeCWD(error.toString().split("\n").slice(0, 2).join("\n")), + ); diff --git a/test/helpers/readAsset.js b/test/helpers/readAsset.js new file mode 100644 index 00000000..bd1ae276 --- /dev/null +++ b/test/helpers/readAsset.js @@ -0,0 +1,23 @@ +import path from "path"; + +export default (asset, compiler, stats) => { + const usedFs = compiler.outputFileSystem; + const outputPath = stats.compilation.outputOptions.path; + + let data = ""; + let targetFile = asset; + + const queryStringIdx = targetFile.indexOf("?"); + + if (queryStringIdx >= 0) { + targetFile = targetFile.slice(0, queryStringIdx); + } + + try { + data = usedFs.readFileSync(path.join(outputPath, targetFile)).toString(); + } catch (error) { + data = error.toString(); + } + + return data; +}; diff --git a/test/helpers/runInJsDom.js b/test/helpers/runInJsDom.js new file mode 100644 index 00000000..387b19f4 --- /dev/null +++ b/test/helpers/runInJsDom.js @@ -0,0 +1,46 @@ +import jsdom from "jsdom"; + +import { readAsset } from "./index"; + +/** + * @param {string} assetName asset name + * @param {Compiler} compiler compiler + * @param {Stats} stats stats + * @param {(dom: JSDOM, code: string) => void} testFn test function + */ +function runInJsDom(assetName, compiler, stats, testFn) { + const bundle = readAsset(assetName, compiler, stats); + const virtualConsole = new jsdom.VirtualConsole(); + + virtualConsole.sendTo(console); + + const dom = new jsdom.JSDOM( + ` + + + style-loader test + + + +

Body

+
+ + + +`, + { + resources: "usable", + runScripts: "dangerously", + virtualConsole, + }, + ); + + dom.window.eval(bundle); + + testFn(dom, bundle); + + // free memory associated with the window + dom.window.close(); +} + +export default runInJsDom; diff --git a/test/helpers/source.js b/test/helpers/source.js new file mode 100644 index 00000000..54c5fddc --- /dev/null +++ b/test/helpers/source.js @@ -0,0 +1,24 @@ +/** + * @param {string} name name + * @param {Stats} stats stats + * @returns {undefined | string | Buffer} source + */ +export default function getSource(name, stats) { + const { modules } = stats.toJson({ source: true }); + + for (let i = 0; i < modules.length; i++) { + const module = modules[i]; + + if (module.modules && module.modules.length > 0) { + for (let j = 0; j < module.modules.length; j++) { + if (module.modules[j].name === name) { + return module.modules[j].source; + } + } + } else if (module.name === name) { + return module.source; + } + } + + return undefined; +} diff --git a/test/helpers/yn.js b/test/helpers/yn.js new file mode 100644 index 00000000..38e6c26e --- /dev/null +++ b/test/helpers/yn.js @@ -0,0 +1,18 @@ +/** + * @param {string} value value + * @param {boolean} defaultValue default value + * @returns {boolean} yes or no + */ +function yn(value, defaultValue = false) { + if (/^(?:y|yes|true|1|on)$/i.test(value)) { + return true; + } + + if (/^(?:n|no|false|0|off)$/i.test(value)) { + return false; + } + + return defaultValue; +} + +module.exports = yn; diff --git a/test/hooks.test.js b/test/hooks.test.js new file mode 100644 index 00000000..30ad3e4f --- /dev/null +++ b/test/hooks.test.js @@ -0,0 +1,72 @@ +/* eslint-env browser */ +import path from "path"; + +import { Template } from "webpack"; + +import MiniCssExtractPlugin from "../src"; + +import { compile, getCompiler, runInJsDom } from "./helpers/index"; + +describe("hooks", () => { + it("beforeTagInsert", async () => { + const webpackCompiler = getCompiler( + "insert.js", + {}, + { + mode: "none", + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + { + /** + * @param {import('webpack').Compiler} compiler compiler + */ + apply: (compiler) => { + compiler.hooks.compilation.tap("sri", (compilation) => { + MiniCssExtractPlugin.getCompilationHooks( + compilation, + ).beforeTagInsert.tap("sri", (source, varNames) => + Template.asString([ + source, + `${varNames.tag}.setAttribute("integrity", "sriHashes[${varNames.chunkId}]");`, + ]), + ); + }); + }, + }, + { + /** + * @param {import('webpack').Compiler} compiler compiler + */ + apply: (compiler) => { + compiler.hooks.compilation.tap("href", (compilation) => { + MiniCssExtractPlugin.getCompilationHooks( + compilation, + ).beforeTagInsert.tap("changeHref", (source, varNames) => + Template.asString([ + source, + `${varNames.tag}.setAttribute("href", "https://github.com/webpack/mini-css-extract-plugin");`, + ]), + ); + }); + }, + }, + ], + }, + ); + const stats = await compile(webpackCompiler); + runInJsDom("main.bundle.js", webpackCompiler, stats, (dom) => { + const [tag] = dom.window.document.head.getElementsByTagName("link"); + expect(tag.getAttribute("integrity")).toBe("sriHashes[chunkId]"); + expect(tag.getAttribute("href")).toBe( + "https://github.com/webpack/mini-css-extract-plugin", + ); + }); + }); +}); diff --git a/test/ignoreOrder-option.test.js b/test/ignoreOrder-option.test.js new file mode 100644 index 00000000..eff9585c --- /dev/null +++ b/test/ignoreOrder-option.test.js @@ -0,0 +1,45 @@ +import path from "path"; + +import webpack from "webpack"; + +describe("IgnoreOrder", () => { + it("should emit warnings", (done) => { + const casesDirectory = path.resolve(__dirname, "cases"); + const directoryForCase = path.resolve(casesDirectory, "ignoreOrderFalse"); + + const webpackConfig = require( + path.resolve(directoryForCase, "webpack.config.js"), + ); + + const compiler = webpack({ + ...webpackConfig, + mode: "development", + context: directoryForCase, + cache: false, + }); + compiler.run((err1, stats) => { + expect(stats.hasWarnings()).toBe(true); + done(); + }); + }); + + it("should not emit warnings", (done) => { + const casesDirectory = path.resolve(__dirname, "cases"); + const directoryForCase = path.resolve(casesDirectory, "ignoreOrder"); + + const webpackConfig = require( + path.resolve(directoryForCase, "webpack.config.js"), + ); + + const compiler = webpack({ + ...webpackConfig, + mode: "development", + context: directoryForCase, + cache: false, + }); + compiler.run((err1, stats) => { + expect(stats.hasWarnings()).toBe(false); + done(); + }); + }); +}); diff --git a/test/insert-option.test.js b/test/insert-option.test.js new file mode 100644 index 00000000..76ec7dae --- /dev/null +++ b/test/insert-option.test.js @@ -0,0 +1,106 @@ +/* global document */ +import path from "path"; + +import MiniCssExtractPlugin from "../src"; + +import { + compile, + getCompiler, + getErrors, + getWarnings, + runInJsDom, +} from "./helpers/index"; + +describe("insert option", () => { + it("should work without insert option", async () => { + const compiler = getCompiler( + "insert.js", + {}, + { + mode: "none", + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it("should work when insert option is string", async () => { + const compiler = getCompiler( + "insert.js", + {}, + { + mode: "none", + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + insert: "#existing-style", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it("should work when insert option is function", async () => { + const compiler = getCompiler( + "insert.js", + {}, + { + mode: "none", + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + // eslint-disable-next-line + insert: function (linkTag) { + const reference = document.querySelector("#existing-style"); + if (reference) { + reference.parentNode.insertBefore(linkTag, reference); + } + }, + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); +}); diff --git a/test/linkTag-option.test.js b/test/linkTag-option.test.js new file mode 100644 index 00000000..e863d66b --- /dev/null +++ b/test/linkTag-option.test.js @@ -0,0 +1,97 @@ +/* eslint-env browser */ +import path from "path"; + +import MiniCssExtractPlugin from "../src"; + +import { + compile, + getCompiler, + getErrors, + getWarnings, + runInJsDom, +} from "./helpers/index"; + +describe("linkType option", () => { + it("should work without linkType option", async () => { + const compiler = getCompiler( + "attributes.js", + {}, + { + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it('should work when linkType option is "false"', async () => { + const compiler = getCompiler( + "attributes.js", + {}, + { + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + linkType: false, + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it('should work when linkType option is "text/css"', async () => { + const compiler = getCompiler( + "attributes.js", + {}, + { + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + linkType: "text/css", + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); +}); diff --git a/test/manual/index.html b/test/manual/index.html index e25d71de..8c93cb71 100644 --- a/test/manual/index.html +++ b/test/manual/index.html @@ -1,48 +1,126 @@ - - - - mini-css-extract-plugin testcase - - - - - - - -
- Initial CSS: Must be green -
-
-

Lazy CSS: Must be red, but turn green when .

-

But turn orange, when . Additional clicks have no effect.

-

Refresh and press buttons in reverse order: This should turn green instead.

-
-
-

Preloaded CSS: Must be green.

-

displays an alert but has no styling effect.

-
-
-

Preloaded inlined CSS: Must be green.

-

displays an alert but has no styling effect.

-
-
- - + + + + mini-css-extract-plugin testcase + + + + + + + + + +
Initial CSS: Must be green
+
+

Hot Module Replacement

+
RED
+
GREEN
+
BLUE
+
+
+

Hot Module Replacement + CSS modules

+
RED
+
GREEN
+
BLUE
+
+
+

+ Lazy CSS: Must be red, but turn green when + . +

+

+ But turn orange, when + . Additional + clicks have no effect. +

+

+ (HMR) Now modify the color in lazy.css and save it: This should remain + orange. +

+

+ Refresh and press buttons in reverse order: This should turn green + instead. +

+
+
+

+ Lazy CSS Module: Must be red, but turn green when + . +

+
+
+

+ Lazy CSS: Turn off the network and + . +

+

An error should have appeared.

+

+ Now if you turn the network back on and click it again, it should turn + aqua. +

+
+
+

Preloaded CSS: Must be green.

+

+ displays + an alert but has no styling effect. +

+
+
+

Preloaded inlined CSS: Must be green.

+

+ displays + an alert but has no styling effect. +

+
+
+

CrossOriginLoading Option: Must be red.

+

+ loads chunks with crossorigin + attribute and should turn green. +

+
+
+
+

Prefetch CSS: Must be blue and green after click.

+

+ to load + prefetched chunk +

+
+
+

Preload CSS: Must be white, then blue, then green after click.

+

+ to load + preloaded chunk +

+
+ + diff --git a/test/manual/src/crossorigin.css b/test/manual/src/crossorigin.css new file mode 100644 index 00000000..2b7fc030 --- /dev/null +++ b/test/manual/src/crossorigin.css @@ -0,0 +1,3 @@ +.crossorigin { + background: lightgreen; +} diff --git a/test/manual/src/crossorigin.js b/test/manual/src/crossorigin.js new file mode 100644 index 00000000..90d8e8b9 --- /dev/null +++ b/test/manual/src/crossorigin.js @@ -0,0 +1 @@ +import "./crossorigin.css"; diff --git a/test/manual/src/index.js b/test/manual/src/index.js index 3f4bd150..03a68dc2 100644 --- a/test/manual/src/index.js +++ b/test/manual/src/index.js @@ -1,22 +1,119 @@ -import './initial.css'; +/* eslint-env browser */ +/* global __webpack_public_path__ */ +/* eslint-disable no-console, camelcase, no-global-assign */ + +import "./initial.css"; +import "./simple.css"; +import classes from "./simple.module.css"; + +console.log("___CLASSES__"); +console.log(classes); + +function replaceClass(originalClass, newClass) { + const nodes = document.querySelectorAll(`.${originalClass}`); + + nodes.forEach((node) => { + const { classList } = node; + classList.remove(originalClass); + classList.add(newClass); + }); +} + +Object.keys(classes).forEach((localClass) => { + replaceClass(localClass, classes[localClass]); +}); + +let oldClasses = classes; + +if (module.hot) { + module.hot.accept("./simple.module.css", () => { + Object.keys(oldClasses).forEach((localClass) => { + replaceClass(oldClasses[localClass], localClass); + }); + Object.keys(classes).forEach((localClass) => { + replaceClass(localClass, classes[localClass]); + }); + oldClasses = classes; + // eslint-disable-next-line no-alert + alert("HMR updated CSS module"); + }); +} const handleError = (err) => { document.querySelector(".errors").textContent += `\n${err.toString()}`; console.error(err); -} +}; -const makeButton = (className, fn) => { +const makeButton = (className, fn, shouldDisable = true) => { const button = document.querySelector(className); button.addEventListener("click", () => { - button.disabled = true; - fn().then(() => { - button.disabled = false; - }).catch(handleError); + if (shouldDisable) { + button.disabled = true; + } + fn() + .then(() => { + button.disabled = false; + }) + .catch(handleError); }); -} +}; + +makeButton(".lazy-button", () => import("./lazy")); +makeButton(".lazy-button2", () => import("./lazy2.css")); +makeButton(".lazy-module-button", () => + import("./lazy.module.css").then((module) => { + console.log(module); + document + .querySelector(".lazy-css-module") + // eslint-disable-next-line no-underscore-dangle + .classList.add(module.__esModule ? module.default.style : module.style); + }), +); + +makeButton( + ".preloaded-button1", + () => import(/* webpackChunkName: "preloaded1" */ "./preloaded1"), +); +makeButton( + ".preloaded-button2", + () => import(/* webpackChunkName: "preloaded2" */ "./preloaded2"), +); + +makeButton(".lazy-failure-button", () => import("./lazy-failure"), false); + +makeButton(".crossorigin", () => { + const originalPublicPath = __webpack_public_path__; + __webpack_public_path__ = "http://127.0.0.1:8080/dist/"; + const promise = import("./crossorigin").then(() => { + const lastTwoElements = Array.from(document.head.children).slice(-2); + const hasCrossorigin = lastTwoElements.every( + (element) => element.crossOrigin === "anonymous", + ); + if (!hasCrossorigin) { + throw new Error('Chunks miss crossorigin="anonymous" attribute.'); + } + }); + __webpack_public_path__ = originalPublicPath; + return promise; +}); + +const worker = new Worker(new URL("./worker.js", import.meta.url)); + +worker.postMessage("test"); + +worker.addEventListener("message", (event) => { + console.log(`Received message from worker: ${event.data}`); +}); -makeButton(".lazy-button", () => import('./lazy.js')); -makeButton(".lazy-button2", () => import('./lazy2.css')); +makeButton( + ".prefetch-button", + () => import(/* webpackPrefetch: true */ "./prefetch.css"), + false, +); -makeButton(".preloaded-button1", () => import(/* webpackChunkName: "preloaded1" */ './preloaded1')); -makeButton(".preloaded-button2", () => import(/* webpackChunkName: "preloaded2" */ './preloaded2')); +makeButton( + ".preload-button", + // eslint-disable-next-line import/extensions + () => import("./preload.js"), + false, +); diff --git a/test/manual/src/lazy-failure.css b/test/manual/src/lazy-failure.css new file mode 100644 index 00000000..479edbac --- /dev/null +++ b/test/manual/src/lazy-failure.css @@ -0,0 +1,3 @@ +.lazy-failure-css { + background: aqua; +} diff --git a/test/manual/src/lazy-failure.js b/test/manual/src/lazy-failure.js new file mode 100644 index 00000000..d3131b2c --- /dev/null +++ b/test/manual/src/lazy-failure.js @@ -0,0 +1,3 @@ +/* eslint-env browser */ + +import "./lazy-failure.css"; diff --git a/test/manual/src/lazy.js b/test/manual/src/lazy.js index bba7d747..fba99180 100644 --- a/test/manual/src/lazy.js +++ b/test/manual/src/lazy.js @@ -1 +1,3 @@ -import './lazy.css'; +/* eslint-env browser */ + +import "./lazy.css"; diff --git a/test/manual/src/lazy.module.css b/test/manual/src/lazy.module.css new file mode 100644 index 00000000..e9c49ebd --- /dev/null +++ b/test/manual/src/lazy.module.css @@ -0,0 +1,3 @@ +.style { + background: lightgreen; +} diff --git a/test/manual/src/prefetch.css b/test/manual/src/prefetch.css new file mode 100644 index 00000000..b0439ee6 --- /dev/null +++ b/test/manual/src/prefetch.css @@ -0,0 +1,3 @@ +.prefetch { + background: lightgreen !important; +} diff --git a/test/manual/src/preload.css b/test/manual/src/preload.css new file mode 100644 index 00000000..2742013d --- /dev/null +++ b/test/manual/src/preload.css @@ -0,0 +1,3 @@ +.preload { + background: lightgreen !important; +} diff --git a/test/manual/src/preload.js b/test/manual/src/preload.js new file mode 100644 index 00000000..015a99a7 --- /dev/null +++ b/test/manual/src/preload.js @@ -0,0 +1,7 @@ +async function load() { + setTimeout(() => { + import(/* webpackPreload: true */ "./preload.css"); + }, 1000); +} + +load(); diff --git a/test/manual/src/preloaded1.js b/test/manual/src/preloaded1.js index 1813036b..58f14943 100644 --- a/test/manual/src/preloaded1.js +++ b/test/manual/src/preloaded1.js @@ -1,3 +1,6 @@ -import './preloaded1.css'; +/* global alert */ +/* eslint-disable no-alert */ -alert('Ok'); +import "./preloaded1.css"; + +alert("Ok"); diff --git a/test/manual/src/preloaded2.js b/test/manual/src/preloaded2.js index c0a154c0..9641ac1d 100644 --- a/test/manual/src/preloaded2.js +++ b/test/manual/src/preloaded2.js @@ -1,3 +1,6 @@ -import './preloaded2.css'; +/* eslint-env browser */ +/* eslint-disable no-alert */ -alert('Ok'); +import "./preloaded2.css"; + +alert("Ok"); diff --git a/test/manual/src/simple.css b/test/manual/src/simple.css new file mode 100644 index 00000000..af62930f --- /dev/null +++ b/test/manual/src/simple.css @@ -0,0 +1,11 @@ +.r { + color: red; +} + +.g { + color: green; +} + +.b { + color: blue; +} diff --git a/test/manual/src/simple.module.css b/test/manual/src/simple.module.css new file mode 100644 index 00000000..c3ebbd0e --- /dev/null +++ b/test/manual/src/simple.module.css @@ -0,0 +1,11 @@ +.rr { + color: red; +} + +.gg { + color: green; +} + +.bb { + color: blue; +} diff --git a/test/manual/src/worker.css b/test/manual/src/worker.css new file mode 100644 index 00000000..90439bac --- /dev/null +++ b/test/manual/src/worker.css @@ -0,0 +1,3 @@ +body { + background: green; +} diff --git a/test/manual/src/worker.js b/test/manual/src/worker.js new file mode 100644 index 00000000..3edbc7a6 --- /dev/null +++ b/test/manual/src/worker.js @@ -0,0 +1,15 @@ +import "./worker.css"; + +// eslint-disable-next-line no-undef +self.onmessage = (event) => { + console.log(`Received message from application: ${event.data}`); + + // eslint-disable-next-line no-undef + self.postMessage("I'm alive!"); +}; + +async function load() { + return import("./simple.css"); +} + +load(); diff --git a/test/manual/webpack.config.js b/test/manual/webpack.config.js index 1565de3f..3e4c4d81 100644 --- a/test/manual/webpack.config.js +++ b/test/manual/webpack.config.js @@ -1,27 +1,87 @@ -const Self = require('../../'); +const Self = require("../../"); +const yn = require("../helpers/yn"); + +const ENABLE_HMR = + typeof process.env.ENABLE_HMR !== "undefined" + ? Boolean(process.env.ENABLE_HMR) + : true; + +const ENABLE_ES_MODULE = + typeof process.env.ES_MODULE !== "undefined" + ? Boolean(process.env.ES_MODULE) + : true; + +const OLD_API = + typeof process.env.OLD_API !== "undefined" ? yn(process.env.OLD_API) : false; + +console.log("OPTIONS:"); +console.log("ENABLE_HMR:", ENABLE_HMR); +console.log("ENABLE_ES_MODULE:", ENABLE_ES_MODULE); +console.log("OLD_API:", OLD_API); module.exports = { - mode: 'development', + devtool: false, + mode: "development", output: { - publicPath: '/dist/', + chunkFilename: "[name].chunk.js", + publicPath: "/dist/", + crossOriginLoading: "anonymous", }, module: { rules: [ { test: /\.css$/, + exclude: [/\.module\.css$/i], use: [ - Self.loader, - 'css-loader', + { + loader: Self.loader, + }, + { + loader: "css-loader", + options: { + esModule: ENABLE_ES_MODULE, + }, + }, + ], + }, + { + test: /\.module\.css$/i, + use: [ + { + loader: Self.loader, + options: { + esModule: ENABLE_ES_MODULE, + }, + }, + { + loader: "css-loader", + options: { + modules: true, + esModule: ENABLE_ES_MODULE, + }, + }, ], }, ], }, plugins: [ new Self({ - filename: '[name].css', + filename: "[name].css", + chunkFilename: "[name].chunk.css", + experimentalUseImportModule: OLD_API, }), ], devServer: { - contentBase: __dirname, + hot: ENABLE_HMR, + static: { + directory: __dirname, + watch: { + // prevent page reload on source change so that we can test HMR + ignored: /src/, + }, + }, + headers: { + "Access-Control-Allow-Origin": "*", + }, }, }; diff --git a/test/nonce.test.js b/test/nonce.test.js new file mode 100644 index 00000000..70e5e976 --- /dev/null +++ b/test/nonce.test.js @@ -0,0 +1,70 @@ +/* eslint-env browser */ +import path from "path"; + +import MiniCssExtractPlugin from "../src"; + +import { + compile, + getCompiler, + getErrors, + getWarnings, + runInJsDom, +} from "./helpers/index"; + +describe("nonce", () => { + it("should work when __webpack_nonce__ is not defined", async () => { + const compiler = getCompiler( + "no-nonce.js", + {}, + { + mode: "none", + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it("should work when __webpack_nonce__ is defined", async () => { + const compiler = getCompiler( + "nonce.js", + {}, + { + mode: "none", + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); +}); diff --git a/test/normalize-url.test.js b/test/normalize-url.test.js new file mode 100644 index 00000000..d7b8612b --- /dev/null +++ b/test/normalize-url.test.js @@ -0,0 +1,15 @@ +import normalizeUrl from "../src/hmr/normalize-url"; + +import dataUrls from "./fixtures/json/data-urls.json"; + +describe("normalize-url", () => { + for (const entry of dataUrls.main) { + const [url, expected] = entry; + + it(`should work with "${url}" url`, async () => { + const result = normalizeUrl(url); + + expect(result).toBe(expected); + }); + } +}); diff --git a/test/runtime-option.test.js b/test/runtime-option.test.js new file mode 100644 index 00000000..d18bab15 --- /dev/null +++ b/test/runtime-option.test.js @@ -0,0 +1,105 @@ +/* eslint-env browser */ +import path from "path"; + +import MiniCssExtractPlugin from "../src"; + +import { + compile, + getCompiler, + getErrors, + getWarnings, + runInJsDom, +} from "./helpers/index"; + +describe("noRuntime option", () => { + it("should work without the 'runtime' option", async () => { + const compiler = getCompiler( + "attributes.js", + {}, + { + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom, bundle) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + expect(bundle).toContain("webpack/runtime/css loading"); + expect(bundle).toContain("webpack/runtime/get mini-css chunk filename"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it("should work when the 'runtime' option is 'false'", async () => { + const compiler = getCompiler( + "attributes.js", + {}, + { + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + runtime: false, + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom, bundle) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + expect(bundle).not.toContain("webpack/runtime/css loading"); + expect(bundle).not.toContain( + "webpack/runtime/get mini-css chunk filename", + ); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); + + it("should work when the 'runtime' option is 'true'", async () => { + const compiler = getCompiler( + "attributes.js", + {}, + { + output: { + publicPath: "", + path: path.resolve(__dirname, "../outputs"), + filename: "[name].bundle.js", + }, + plugins: [ + new MiniCssExtractPlugin({ + runtime: true, + filename: "[name].css", + }), + ], + }, + ); + const stats = await compile(compiler); + + runInJsDom("main.bundle.js", compiler, stats, (dom, bundle) => { + expect(dom.serialize()).toMatchSnapshot("DOM"); + expect(bundle).toContain("webpack/runtime/css loading"); + expect(bundle).toContain("webpack/runtime/get mini-css chunk filename"); + }); + + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); +}); diff --git a/test/stringifyLocal.test.js b/test/stringifyLocal.test.js new file mode 100644 index 00000000..faca6fa5 --- /dev/null +++ b/test/stringifyLocal.test.js @@ -0,0 +1,26 @@ +import { stringifyLocal } from "../src/utils"; + +describe("stringifyLocal", () => { + it("primitive", async () => { + const testObj = "classA"; + + expect(stringifyLocal(testObj)).toBe('"classA"'); + }); + + it("arrow function", async () => { + const testFn = () => "classA"; + + expect(stringifyLocal(testFn)).toBe('() => "classA"'); + }); + + it("function", async () => { + // eslint-disable-next-line func-style + const testFn = function testFn() { + return "classA"; + }; + + expect(stringifyLocal(testFn)).toBe( + 'function testFn() {\n return "classA";\n }', + ); + }); +}); diff --git a/test/validate-loader-options.test.js b/test/validate-loader-options.test.js new file mode 100644 index 00000000..24e5b2ce --- /dev/null +++ b/test/validate-loader-options.test.js @@ -0,0 +1,68 @@ +import { compile, getCompiler } from "./helpers"; + +describe("validate options", () => { + const tests = { + publicPath: { + success: ["/public/path/to/"], + failure: [true], + }, + esModule: { + success: [true, false], + failure: [1], + }, + defaultExport: { + success: [true, false], + failure: [1], + }, + unknown: { + success: [], + failure: [1, true, false, "test", /test/, [], {}, { foo: "bar" }], + }, + }; + + function stringifyValue(value) { + if ( + Array.isArray(value) || + (value && typeof value === "object" && value.constructor === Object) + ) { + return JSON.stringify(value); + } + + return value; + } + + async function createTestCase(key, value, type) { + it(`should ${ + type === "success" ? "successfully validate" : "throw an error on" + } the "${key}" option with "${stringifyValue(value)}" value`, async () => { + const compiler = getCompiler("simple.js", { [key]: value }); + + let stats; + + try { + stats = await compile(compiler); + } finally { + if (type === "success") { + expect(stats.hasErrors()).toBe(false); + } else if (type === "failure") { + const { + compilation: { errors }, + } = stats; + + expect(errors).toHaveLength(1); + expect(() => { + throw new Error(errors[0].error.message); + }).toThrowErrorMatchingSnapshot(); + } + } + }); + } + + for (const [key, values] of Object.entries(tests)) { + for (const type of Object.keys(values)) { + for (const value of values[type]) { + createTestCase(key, value, type); + } + } + } +}); diff --git a/test/validate-plugin-options.test.js b/test/validate-plugin-options.test.js new file mode 100644 index 00000000..e4451ec3 --- /dev/null +++ b/test/validate-plugin-options.test.js @@ -0,0 +1,83 @@ +import MiniCssExtractPlugin from "../src"; + +describe("validate options", () => { + const tests = { + filename: { + success: [ + "[name].css", + ({ name }) => `${name.replace("/js/", "/css/")}.css`, + ], + failure: [true, "/styles/[name].css", ""], + }, + chunkFilename: { + success: ["[id].css", ({ chunk }) => `${chunk.id}.${chunk.name}.css`], + failure: [true, "/styles/[id].css", ""], + }, + ignoreOrder: { + success: [true, false], + failure: [1], + }, + insert: { + success: ["#existing-style", function insert() {}], + failure: [1, true, {}], + }, + attributes: { + success: [{}, { id: "id" }], + failure: [true], + }, + linkType: { + success: [true, false, "text/css"], + failure: [1, {}, [], "invalid/type"], + }, + unknown: { + success: [], + failure: [1, true, false, "test", /test/, [], {}, { foo: "bar" }], + }, + }; + + function stringifyValue(value) { + if ( + Array.isArray(value) || + (value && typeof value === "object" && value.constructor === Object) + ) { + return JSON.stringify(value); + } + + return value; + } + + async function createTestCase(key, value, type) { + it(`should ${ + type === "success" ? "successfully validate" : "throw an error on" + } the "${key}" option with "${stringifyValue(value)}" value`, async () => { + let error; + + try { + // eslint-disable-next-line no-new + new MiniCssExtractPlugin({ [key]: value }); + } catch (err) { + if (err.name !== "ValidationError") { + throw err; + } + + error = err; + } finally { + if (type === "success") { + expect(error).toBeUndefined(); + } else if (type === "failure") { + expect(() => { + throw error; + }).toThrowErrorMatchingSnapshot(); + } + } + }); + } + + for (const [key, values] of Object.entries(tests)) { + for (const type of Object.keys(values)) { + for (const value of values[type]) { + createTestCase(key, value, type); + } + } + } +}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..fb418069 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "esnext", + "moduleResolution": "node", + "allowJs": true, + "checkJs": true, + "strict": true, + "types": ["node"], + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true + }, + "include": ["./src/**/*"] +} diff --git a/types/hmr/hotModuleReplacement.d.ts b/types/hmr/hotModuleReplacement.d.ts new file mode 100644 index 00000000..b8238313 --- /dev/null +++ b/types/hmr/hotModuleReplacement.d.ts @@ -0,0 +1,16 @@ +declare namespace _exports { + export { GetScriptSrc, HotHTMLLinkElement }; +} +declare function _exports( + moduleId: number | string, + options: { + filename?: string; + locals?: boolean; + }, +): () => void; +export = _exports; +type GetScriptSrc = (filename?: string) => string[]; +type HotHTMLLinkElement = HTMLLinkElement & { + isLoaded: boolean; + visited: boolean; +}; diff --git a/types/hmr/normalize-url.d.ts b/types/hmr/normalize-url.d.ts new file mode 100644 index 00000000..b071c6f5 --- /dev/null +++ b/types/hmr/normalize-url.d.ts @@ -0,0 +1,2 @@ +declare function _exports(urlString: string): string; +export = _exports; diff --git a/types/hooks.d.ts b/types/hooks.d.ts new file mode 100644 index 00000000..dba8db44 --- /dev/null +++ b/types/hooks.d.ts @@ -0,0 +1,17 @@ +export function getCompilationHooks( + compilation: Compilation, +): MiniCssExtractPluginCompilationHooks; +export type Compilation = import("webpack").Compilation; +export type VarNames = { + tag: string; + chunkId: string; + href: string; + resolve: string; + reject: string; +}; +export type MiniCssExtractPluginCompilationHooks = { + beforeTagInsert: import("tapable").SyncWaterfallHook< + [string, VarNames], + string + >; +}; diff --git a/types/index.d.ts b/types/index.d.ts new file mode 100644 index 00000000..ad31d5ee --- /dev/null +++ b/types/index.d.ts @@ -0,0 +1,362 @@ +export = MiniCssExtractPlugin; +declare class MiniCssExtractPlugin { + /** + * @param {Compiler["webpack"]} webpack webpack + * @returns {CssModuleConstructor} CSS module constructor + */ + static getCssModule(webpack: Compiler["webpack"]): CssModuleConstructor; + /** + * @param {Compiler["webpack"]} webpack webpack + * @returns {CssDependencyConstructor} CSS dependency constructor + */ + static getCssDependency( + webpack: Compiler["webpack"], + ): CssDependencyConstructor; + /** + * Returns all hooks for the given compilation + * @param {Compilation} compilation the compilation + * @returns {MiniCssExtractPluginCompilationHooks} hooks + */ + static getCompilationHooks( + compilation: Compilation, + ): MiniCssExtractPluginCompilationHooks; + /** + * @param {PluginOptions=} options options + */ + constructor(options?: PluginOptions | undefined); + /** + * @private + * @type {WeakMap>} + */ + private _sortedModulesCache; + /** + * @private + * @type {NormalizedPluginOptions} + */ + private options; + /** + * @private + * @type {RuntimeOptions} + */ + private runtimeOptions; + /** + * @param {Compiler} compiler compiler + */ + apply(compiler: Compiler): void; + /** + * @private + * @param {Chunk} chunk chunk + * @param {ChunkGraph} chunkGraph chunk graph + * @returns {Iterable} modules + */ + private getChunkModules; + /** + * @private + * @param {Compilation} compilation compilation + * @param {Chunk} chunk chunk + * @param {CssModule[]} modules modules + * @param {Compilation["requestShortener"]} requestShortener request shortener + * @returns {Set} css modules + */ + private sortModules; + /** + * @private + * @param {Compiler} compiler compiler + * @param {Compilation} compilation compilation + * @param {Chunk} chunk chunk + * @param {CssModule[]} modules modules + * @param {Compiler["requestShortener"]} requestShortener request shortener + * @param {string} filenameTemplate filename template + * @param {Parameters['output']['filename'], string | undefined>>[0]} pathData path data + * @returns {Source} source + */ + private renderContentAsset; +} +declare namespace MiniCssExtractPlugin { + export { + pluginName, + pluginSymbol, + loader, + Schema, + Compiler, + Compilation, + ChunkGraph, + Chunk, + ChunkGroup, + Module, + Dependency, + Source, + Configuration, + WebpackError, + AssetInfo, + LoaderDependency, + Filename, + ChunkFilename, + LoaderOptions, + PluginOptions, + NormalizedPluginOptions, + RuntimeOptions, + CssModuleDependency, + CssModule, + CssModuleConstructor, + CssDependency, + CssDependencyOptions, + CssDependencyConstructor, + VarNames, + MiniCssExtractPluginCompilationHooks, + }; +} +/** @typedef {import("schema-utils/declarations/validate").Schema} Schema */ +/** @typedef {import("webpack").Compiler} Compiler */ +/** @typedef {import("webpack").Compilation} Compilation */ +/** @typedef {import("webpack").ChunkGraph} ChunkGraph */ +/** @typedef {import("webpack").Chunk} Chunk */ +/** @typedef {import("webpack").ChunkGroup} ChunkGroup */ +/** @typedef {import("webpack").Module} Module */ +/** @typedef {import("webpack").Dependency} Dependency */ +/** @typedef {import("webpack").sources.Source} Source */ +/** @typedef {import("webpack").Configuration} Configuration */ +/** @typedef {import("webpack").WebpackError} WebpackError */ +/** @typedef {import("webpack").AssetInfo} AssetInfo */ +/** @typedef {import("./loader.js").Dependency} LoaderDependency */ +/** @typedef {NonNullable['output']['filename']>} Filename */ +/** @typedef {NonNullable['output']['chunkFilename']>} ChunkFilename */ +/** + * @typedef {object} LoaderOptions + * @property {string | ((resourcePath: string, rootContext: string) => string)=} publicPath public path + * @property {boolean=} emit true when need to emit, otherwise false + * @property {boolean=} esModule need to generate ES module syntax + * @property {string=} layer a layer + * @property {boolean=} defaultExport true when need to use default export, otherwise false + */ +/** + * @typedef {object} PluginOptions + * @property {Filename=} filename filename + * @property {ChunkFilename=} chunkFilename chunk filename + * @property {boolean=} ignoreOrder true when need to ignore order, otherwise false + * @property {string | ((linkTag: HTMLLinkElement) => void)=} insert link insert place or a custom insert function + * @property {Record=} attributes link attributes + * @property {string | false | 'text/css'=} linkType value of a link type attribute + * @property {boolean=} runtime true when need to generate runtime code, otherwise false + * @property {boolean=} experimentalUseImportModule true when need to use `experimentalUseImportModule` API, otherwise false + */ +/** + * @typedef {object} NormalizedPluginOptions + * @property {Filename} filename filename + * @property {ChunkFilename=} chunkFilename chunk filename + * @property {boolean} ignoreOrder true when need to ignore order, otherwise false + * @property {string | ((linkTag: HTMLLinkElement) => void)=} insert a link insert place or a custom insert function + * @property {Record=} attributes link attributes + * @property {string | false | 'text/css'=} linkType value of a link type attribute + * @property {boolean} runtime true when need to generate runtime code, otherwise false + * @property {boolean=} experimentalUseImportModule true when need to use `experimentalUseImportModule` API, otherwise false + */ +/** + * @typedef {object} RuntimeOptions + * @property {string | ((linkTag: HTMLLinkElement) => void)=} insert a link insert place or a custom insert function + * @property {string | false | 'text/css'} linkType value of a link type attribute + * @property {Record=} attributes link attributes + */ +declare const pluginName: "mini-css-extract-plugin"; +declare const pluginSymbol: unique symbol; +declare var loader: string; +type Schema = import("schema-utils/declarations/validate").Schema; +type Compiler = import("webpack").Compiler; +type Compilation = import("webpack").Compilation; +type ChunkGraph = import("webpack").ChunkGraph; +type Chunk = import("webpack").Chunk; +type ChunkGroup = import("webpack").ChunkGroup; +type Module = import("webpack").Module; +type Dependency = import("webpack").Dependency; +type Source = import("webpack").sources.Source; +type Configuration = import("webpack").Configuration; +type WebpackError = import("webpack").WebpackError; +type AssetInfo = import("webpack").AssetInfo; +type LoaderDependency = import("./loader.js").Dependency; +type Filename = NonNullable["output"]["filename"]>; +type ChunkFilename = NonNullable< + Required["output"]["chunkFilename"] +>; +type LoaderOptions = { + /** + * public path + */ + publicPath?: + | (string | ((resourcePath: string, rootContext: string) => string)) + | undefined; + /** + * true when need to emit, otherwise false + */ + emit?: boolean | undefined; + /** + * need to generate ES module syntax + */ + esModule?: boolean | undefined; + /** + * a layer + */ + layer?: string | undefined; + /** + * true when need to use default export, otherwise false + */ + defaultExport?: boolean | undefined; +}; +type PluginOptions = { + /** + * filename + */ + filename?: Filename | undefined; + /** + * chunk filename + */ + chunkFilename?: ChunkFilename | undefined; + /** + * true when need to ignore order, otherwise false + */ + ignoreOrder?: boolean | undefined; + /** + * link insert place or a custom insert function + */ + insert?: (string | ((linkTag: HTMLLinkElement) => void)) | undefined; + /** + * link attributes + */ + attributes?: Record | undefined; + /** + * value of a link type attribute + */ + linkType?: (string | false | "text/css") | undefined; + /** + * true when need to generate runtime code, otherwise false + */ + runtime?: boolean | undefined; + /** + * true when need to use `experimentalUseImportModule` API, otherwise false + */ + experimentalUseImportModule?: boolean | undefined; +}; +type NormalizedPluginOptions = { + /** + * filename + */ + filename: Filename; + /** + * chunk filename + */ + chunkFilename?: ChunkFilename | undefined; + /** + * true when need to ignore order, otherwise false + */ + ignoreOrder: boolean; + /** + * a link insert place or a custom insert function + */ + insert?: (string | ((linkTag: HTMLLinkElement) => void)) | undefined; + /** + * link attributes + */ + attributes?: Record | undefined; + /** + * value of a link type attribute + */ + linkType?: (string | false | "text/css") | undefined; + /** + * true when need to generate runtime code, otherwise false + */ + runtime: boolean; + /** + * true when need to use `experimentalUseImportModule` API, otherwise false + */ + experimentalUseImportModule?: boolean | undefined; +}; +type RuntimeOptions = { + /** + * a link insert place or a custom insert function + */ + insert?: (string | ((linkTag: HTMLLinkElement) => void)) | undefined; + /** + * value of a link type attribute + */ + linkType: string | false | "text/css"; + /** + * link attributes + */ + attributes?: Record | undefined; +}; +type CssModuleDependency = { + context: string | null; + identifier: string; + identifierIndex: number; + content: Buffer; + sourceMap?: Buffer; + media?: string; + supports?: string; + layer?: any; + assetsInfo?: Map; + assets?: { + [key: string]: Source; + }; +}; +type CssModule = Module & { + content: Buffer; + media?: string; + sourceMap?: Buffer; + supports?: string; + layer?: string; + assets?: { + [key: string]: Source; + }; + assetsInfo?: Map; +}; +type CssModuleConstructor = { + new (dependency: CssModuleDependency): CssModule; +}; +type CssDependency = Dependency & CssModuleDependency; +type CssDependencyOptions = Omit; +type CssDependencyConstructor = { + new ( + loaderDependency: CssDependencyOptions, + context: string | null, + identifierIndex: number, + ): CssDependency; +}; +type VarNames = { + /** + * tag + */ + tag: string; + /** + * chunk id + */ + chunkId: string; + /** + * href + */ + href: string; + /** + * resolve + */ + resolve: string; + /** + * reject + */ + reject: string; +}; +type MiniCssExtractPluginCompilationHooks = { + /** + * before tag insert hook + */ + beforeTagInsert: import("tapable").SyncWaterfallHook< + [string, VarNames], + string + >; + /** + * link preload hook + */ + linkPreload: SyncWaterfallHook<[string, Chunk]>; + /** + * link prefetch hook + */ + linkPrefetch: SyncWaterfallHook<[string, Chunk]>; +}; +import { SyncWaterfallHook } from "tapable"; diff --git a/types/loader.d.ts b/types/loader.d.ts new file mode 100644 index 00000000..11c90aa6 --- /dev/null +++ b/types/loader.d.ts @@ -0,0 +1,114 @@ +export = loader; +/** + * @this {import("webpack").LoaderContext} + * @param {string} content content + * @returns {string | undefined} the original content + */ +declare function loader( + this: import("webpack").LoaderContext, + content: string, +): string | undefined; +declare namespace loader { + export { + hotLoader, + pitch, + Schema, + Compiler, + Compilation, + Chunk, + Module, + Source, + AssetInfo, + NormalModule, + LoaderOptions, + Locals, + EXPECTED_ANY, + Dependency, + }; +} +import MiniCssExtractPlugin = require("./index"); +/** @typedef {import("schema-utils/declarations/validate").Schema} Schema */ +/** @typedef {import("webpack").Compiler} Compiler */ +/** @typedef {import("webpack").Compilation} Compilation */ +/** @typedef {import("webpack").Chunk} Chunk */ +/** @typedef {import("webpack").Module} Module */ +/** @typedef {import("webpack").sources.Source} Source */ +/** @typedef {import("webpack").AssetInfo} AssetInfo */ +/** @typedef {import("webpack").NormalModule} NormalModule */ +/** @typedef {import("./index.js").LoaderOptions} LoaderOptions */ +/** @typedef {{[key: string]: string | Function }} Locals */ +/** @typedef {any} EXPECTED_ANY */ +/** + * @typedef {object} Dependency + * @property {string} identifier identifier + * @property {string | null} context context + * @property {Buffer} content content + * @property {string=} media media + * @property {string=} supports supports + * @property {string=} layer layer + * @property {Buffer=} sourceMap source map + */ +/** + * @param {string} code code + * @param {{ loaderContext: import("webpack").LoaderContext, options: LoaderOptions, locals: Locals | undefined }} context context + * @returns {string} code and HMR code + */ +declare function hotLoader( + code: string, + context: { + loaderContext: import("webpack").LoaderContext; + options: LoaderOptions; + locals: Locals | undefined; + }, +): string; +/** + * @this {import("webpack").LoaderContext} + * @param {string} request request + */ +declare function pitch( + this: import("webpack").LoaderContext, + request: string, +): void; +type Schema = import("schema-utils/declarations/validate").Schema; +type Compiler = import("webpack").Compiler; +type Compilation = import("webpack").Compilation; +type Chunk = import("webpack").Chunk; +type Module = import("webpack").Module; +type Source = import("webpack").sources.Source; +type AssetInfo = import("webpack").AssetInfo; +type NormalModule = import("webpack").NormalModule; +type LoaderOptions = import("./index.js").LoaderOptions; +type Locals = { + [key: string]: string | Function; +}; +type EXPECTED_ANY = any; +type Dependency = { + /** + * identifier + */ + identifier: string; + /** + * context + */ + context: string | null; + /** + * content + */ + content: Buffer; + /** + * media + */ + media?: string | undefined; + /** + * supports + */ + supports?: string | undefined; + /** + * layer + */ + layer?: string | undefined; + /** + * source map + */ + sourceMap?: Buffer | undefined; +}; diff --git a/types/utils.d.ts b/types/utils.d.ts new file mode 100644 index 00000000..b13c3a66 --- /dev/null +++ b/types/utils.d.ts @@ -0,0 +1,73 @@ +export type Compilation = import("webpack").Compilation; +export type Module = import("webpack").Module; +export type LoaderContext = import("webpack").LoaderContext; +export const ABSOLUTE_PUBLIC_PATH: "webpack:///mini-css-extract-plugin/"; +export const AUTO_PUBLIC_PATH: "__mini_css_extract_plugin_public_path_auto__"; +export const BASE_URI: "webpack://"; +export const MODULE_TYPE: "css/mini-extract"; +export const SINGLE_DOT_PATH_SEGMENT: "__mini_css_extract_plugin_single_dot_path_segment__"; +/** + * @param {Module} a a + * @param {Module} b b + * @returns {0 | 1 | -1} result of comparing + */ +export function compareModulesByIdentifier(a: Module, b: Module): 0 | 1 | -1; +/** + * @param {Record} map value map + * @returns {boolean | ((value: string) => string)} true/false, when unconditionally true/false, or a template function to determine the value at runtime + */ +export function compileBooleanMatcher( + map: Record, +): boolean | ((value: string) => string); +/** + * @param {LoaderContext} loaderContext loader context + * @param {string | Buffer} code code + * @param {string} filename filename + * @returns {Record} exports of a module + */ +export function evalModuleCode( + loaderContext: LoaderContext, + code: string | Buffer, + filename: string, +): Record; +/** + * @param {Compilation} compilation compilation + * @param {string | number} id module id + * @returns {null | Module} the found module + */ +export function findModuleById( + compilation: Compilation, + id: string | number, +): null | Module; +/** + * @param {string} filename filename + * @param {string} outputPath output path + * @param {boolean} enforceRelative true when need to enforce relative path, otherwise false + * @returns {string} undo path + */ +export function getUndoPath( + filename: string, + outputPath: string, + enforceRelative: boolean, +): string; +/** + * @param {string | Function} value local + * @returns {string} stringified local + */ +export function stringifyLocal(value: string | Function): string; +/** + * @param {LoaderContext} loaderContext the loader context + * @param {string} request a request + * @returns {string} a stringified request + */ +export function stringifyRequest( + loaderContext: LoaderContext, + request: string, +): string; +/** @typedef {import("webpack").Compilation} Compilation */ +/** @typedef {import("webpack").Module} Module */ +/** @typedef {import("webpack").LoaderContext} LoaderContext */ +/** + * @returns {boolean} always returns true + */ +export function trueFn(): boolean; diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 5bc3d99c..00000000 --- a/yarn.lock +++ /dev/null @@ -1,8461 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6" - dependencies: - "@babel/highlight" "7.0.0-beta.40" - -"@babel/highlight@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.40.tgz#b43d67d76bf46e1d10d227f68cddcd263786b255" - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - -"@sindresorhus/is@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" - -JSONStream@^1.0.4: - version "1.3.2" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -abab@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - -accepts@~1.3.4, accepts@~1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - -acorn-dynamic-import@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" - dependencies: - acorn "^5.0.0" - -acorn-globals@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" - dependencies: - acorn "^5.0.0" - -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - dependencies: - acorn "^3.0.4" - -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - -acorn@^5.0.0, acorn@^5.3.0, acorn@^5.4.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" - -agent-base@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce" - dependencies: - es6-promisify "^5.0.0" - -ajv-keywords@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" - -ajv-keywords@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" - -ajv@^4.9.1: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - -ajv@^6.1.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.1.1.tgz#978d597fbc2b7d0e5a5c3ddeb149a682f2abfa0e" - dependencies: - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-align@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - dependencies: - string-width "^2.0.0" - -ansi-escapes@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" - -ansi-escapes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" - -ansi-html@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -ansi-styles@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" - dependencies: - color-convert "^1.9.0" - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - dependencies: - color-convert "^1.9.0" - -ansi-styles@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" - -any-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -app-root-path@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" - -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" - dependencies: - default-require-extensions "^1.0.0" - -aproba@^1.0.3, aproba@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - -are-we-there-yet@~1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - -array-differ@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" - -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - -array-flatten@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" - -array-ify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" - -array-includes@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.7.0" - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - -arrify@^1.0.0, arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - -asn1.js@^4.0.0: - version "4.9.2" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.2.tgz#8117ef4f7ed87cd8f89044b5bff97ac243a16c9a" - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - -assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - dependencies: - util "0.10.3" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - -ast-types@0.10.1: - version "0.10.1" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.10.1.tgz#f52fca9715579a14f841d67d7f8d25432ab6a3dd" - -ast-types@0.11.3: - version "0.11.3" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.3.tgz#c20757fe72ee71278ea0ff3d87e5c2ca30d9edf8" - -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - -async@^1.4.0, async@^1.5.0, async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -async@^2.1.4, async@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" - dependencies: - lodash "^4.14.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - -atob@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d" - -autoprefixer@^6.3.1: - version "6.7.7" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" - dependencies: - browserslist "^1.7.6" - caniuse-db "^1.0.30000634" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^5.2.16" - postcss-value-parser "^3.2.3" - -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - -aws4@^1.2.1, aws4@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - -babel-cli@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" - dependencies: - babel-core "^6.26.0" - babel-polyfill "^6.26.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - commander "^2.11.0" - convert-source-map "^1.5.0" - fs-readdir-recursive "^1.0.0" - glob "^7.1.2" - lodash "^4.17.4" - output-file-sync "^1.1.2" - path-is-absolute "^1.0.1" - slash "^1.0.0" - source-map "^0.5.6" - v8flags "^2.1.1" - optionalDependencies: - chokidar "^1.6.1" - -babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.0.0, babel-core@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.0" - debug "^2.6.8" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.7" - slash "^1.0.0" - source-map "^0.5.6" - -babel-generator@^6.18.0, babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-helper-bindify-decorators@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-explode-class@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb" - dependencies: - babel-helper-bindify-decorators "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-regex@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-jest@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.2.2.tgz#eda38dca284e32cc5257f96a9b51351975de4e04" - dependencies: - babel-plugin-istanbul "^4.1.5" - babel-preset-jest "^22.2.0" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" - dependencies: - find-up "^2.1.0" - istanbul-lib-instrument "^1.7.5" - test-exclude "^4.1.1" - -babel-plugin-jest-hoist@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.2.0.tgz#bd34f39d652406669713b8c89e23ef25c890b993" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-async-generators@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" - -babel-plugin-syntax-class-constructor-call@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - -babel-plugin-syntax-decorators@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" - -babel-plugin-syntax-dynamic-import@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - -babel-plugin-syntax-export-extensions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - -babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - -babel-plugin-transform-async-generator-functions@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-generators "^6.5.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-class-constructor-call@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" - dependencies: - babel-plugin-syntax-class-constructor-call "^6.18.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-class-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" - dependencies: - babel-helper-function-name "^6.24.1" - babel-plugin-syntax-class-properties "^6.8.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-decorators@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d" - dependencies: - babel-helper-explode-class "^6.24.1" - babel-plugin-syntax-decorators "^6.13.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" - -babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-export-extensions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" - dependencies: - babel-plugin-syntax-export-extensions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-flow-strip-types@^6.8.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-object-rest-spread@^6.22.0, babel-plugin-transform-object-rest-spread@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" - -babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" - dependencies: - regenerator-transform "^0.10.0" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-polyfill@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" - dependencies: - babel-runtime "^6.26.0" - core-js "^2.5.0" - regenerator-runtime "^0.10.5" - -babel-preset-env@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.23.0" - babel-plugin-transform-es2015-classes "^6.23.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.23.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.23.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.23.0" - babel-plugin-transform-es2015-modules-systemjs "^6.23.0" - babel-plugin-transform-es2015-modules-umd "^6.23.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.23.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.23.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - browserslist "^2.1.2" - invariant "^2.2.2" - semver "^5.3.0" - -babel-preset-es2015@^6.9.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.24.1" - babel-plugin-transform-es2015-classes "^6.24.1" - babel-plugin-transform-es2015-computed-properties "^6.24.1" - babel-plugin-transform-es2015-destructuring "^6.22.0" - babel-plugin-transform-es2015-duplicate-keys "^6.24.1" - babel-plugin-transform-es2015-for-of "^6.22.0" - babel-plugin-transform-es2015-function-name "^6.24.1" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-plugin-transform-es2015-modules-systemjs "^6.24.1" - babel-plugin-transform-es2015-modules-umd "^6.24.1" - babel-plugin-transform-es2015-object-super "^6.24.1" - babel-plugin-transform-es2015-parameters "^6.24.1" - babel-plugin-transform-es2015-shorthand-properties "^6.24.1" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.24.1" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.22.0" - babel-plugin-transform-es2015-unicode-regex "^6.24.1" - babel-plugin-transform-regenerator "^6.24.1" - -babel-preset-jest@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.2.0.tgz#f77b43f06ef4d8547214b2e206cc76a25c3ba0e2" - dependencies: - babel-plugin-jest-hoist "^22.2.0" - babel-plugin-syntax-object-rest-spread "^6.13.0" - -babel-preset-stage-1@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" - dependencies: - babel-plugin-transform-class-constructor-call "^6.24.1" - babel-plugin-transform-export-extensions "^6.22.0" - babel-preset-stage-2 "^6.24.1" - -babel-preset-stage-2@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1" - dependencies: - babel-plugin-syntax-dynamic-import "^6.18.0" - babel-plugin-transform-class-properties "^6.24.1" - babel-plugin-transform-decorators "^6.24.1" - babel-preset-stage-3 "^6.24.1" - -babel-preset-stage-3@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395" - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-generator-functions "^6.24.1" - babel-plugin-transform-async-to-generator "^6.24.1" - babel-plugin-transform-exponentiation-operator "^6.24.1" - babel-plugin-transform-object-rest-spread "^6.22.0" - -babel-register@^6.26.0, babel-register@^6.9.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.17.3, babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - -babylon@^7.0.0-beta.30: - version "7.0.0-beta.42" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.42.tgz#67cfabcd4f3ec82999d29031ccdea89d0ba99657" - -balanced-match@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - -base64-js@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - -bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - -binary-extensions@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" - -binaryextensions@2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.1.1.tgz#3209a51ca4a4ad541a3b8d3d6a6d5b83a2485935" - -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - -bluebird@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - -body-parser@1.18.2: - version "1.18.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.1" - http-errors "~1.6.2" - iconv-lite "0.4.19" - on-finished "~2.3.0" - qs "6.5.1" - raw-body "2.3.2" - type-is "~1.6.15" - -bonjour@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" - dependencies: - array-flatten "^2.1.0" - deep-equal "^1.0.1" - dns-equal "^1.0.0" - dns-txt "^2.0.2" - multicast-dns "^6.0.1" - multicast-dns-service-types "^1.1.0" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - -boom@4.x.x: - version "4.3.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" - dependencies: - hoek "4.x.x" - -boom@5.x.x: - version "5.2.0" - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" - dependencies: - hoek "4.x.x" - -boxen@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" - dependencies: - ansi-align "^2.0.0" - camelcase "^4.0.0" - chalk "^2.0.1" - cli-boxes "^1.0.0" - string-width "^2.0.0" - term-size "^1.2.0" - widest-line "^2.0.0" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.0, braces@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb" - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - define-property "^1.0.0" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - kind-of "^6.0.2" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - -browser-process-hrtime@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" - -browser-resolve@^1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" - dependencies: - resolve "1.1.7" - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.1.1" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f" - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - dependencies: - pako "~1.0.5" - -browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: - version "1.7.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" - dependencies: - caniuse-db "^1.0.30000639" - electron-to-chromium "^1.2.7" - -browserslist@^2.1.2: - version "2.11.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" - dependencies: - caniuse-lite "^1.0.30000792" - electron-to-chromium "^1.3.30" - -bser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" - dependencies: - node-int64 "^0.4.0" - -buffer-indexof@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - -buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -builtin-modules@^1.0.0, builtin-modules@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - -cac@^3.0.3: - version "3.0.4" - resolved "https://registry.yarnpkg.com/cac/-/cac-3.0.4.tgz#6d24ceec372efe5c9b798808bc7f49b47242a4ef" - dependencies: - camelcase-keys "^3.0.0" - chalk "^1.1.3" - indent-string "^3.0.0" - minimist "^1.2.0" - read-pkg-up "^1.0.1" - suffix "^0.1.0" - text-table "^0.2.0" - -cacache@^10.0.4: - version "10.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" - dependencies: - bluebird "^3.5.1" - chownr "^1.0.1" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.1" - mississippi "^2.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.2" - ssri "^5.2.4" - unique-filename "^1.1.0" - y18n "^4.0.0" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -cacheable-request@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" - dependencies: - clone-response "1.0.2" - get-stream "3.0.0" - http-cache-semantics "3.8.1" - keyv "3.0.0" - lowercase-keys "1.0.0" - normalize-url "2.0.1" - responselike "1.0.2" - -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - dependencies: - callsites "^0.2.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" - -camelcase-keys@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-3.0.0.tgz#fc0c6c360363f7377e3793b9a16bccf1070c1ca4" - dependencies: - camelcase "^3.0.0" - map-obj "^1.0.0" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - -camelcase@^4.0.0, camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - -caniuse-api@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" - dependencies: - browserslist "^1.3.6" - caniuse-db "^1.0.30000529" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - -caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000810" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000810.tgz#bd25830c41efab64339a2e381f49677343c84509" - -caniuse-lite@^1.0.30000792: - version "1.0.30000808" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000808.tgz#7d759b5518529ea08b6705a19e70dbf401628ffc" - -capture-stack-trace@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" - dependencies: - ansi-styles "^3.2.0" - escape-string-regexp "^1.0.5" - supports-color "^5.2.0" - -chalk@^2.3.0, chalk@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" - dependencies: - ansi-styles "~1.0.0" - has-color "~0.1.0" - strip-ansi "~0.1.0" - -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - -chokidar@^1.6.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -chokidar@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.3.tgz#dcbd4f6cbb2a55b4799ba8a840ac527e5f4b1176" - dependencies: - anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" - glob-parent "^3.1.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^2.1.1" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.0" - optionalDependencies: - fsevents "^1.1.2" - -chokidar@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.2.tgz#4dc65139eeb2714977735b6a35d06e97b494dfd7" - dependencies: - anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" - glob-parent "^3.1.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^2.1.1" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.0" - optionalDependencies: - fsevents "^1.0.0" - -chownr@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" - -chrome-trace-event@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-0.1.2.tgz#90f36885d5345a50621332f0717b595883d5d982" - -ci-info@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -circular-json@^0.3.1: - version "0.3.3" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" - -clap@^1.0.9: - version "1.2.3" - resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" - dependencies: - chalk "^1.1.3" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cli-boxes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" - -cli-cursor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - dependencies: - restore-cursor "^1.0.1" - -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - dependencies: - restore-cursor "^2.0.0" - -cli-spinners@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" - -cli-table2@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/cli-table2/-/cli-table2-0.2.0.tgz#2d1ef7f218a0e786e214540562d4bd177fe32d97" - dependencies: - lodash "^3.10.1" - string-width "^1.0.1" - optionalDependencies: - colors "^1.1.2" - -cli-table@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" - dependencies: - colors "1.0.3" - -cli-truncate@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" - dependencies: - slice-ansi "0.0.4" - string-width "^1.0.1" - -cli-width@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -cliui@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - -clone-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" - -clone-response@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - dependencies: - mimic-response "^1.0.0" - -clone-stats@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" - -clone-stats@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" - -clone@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - -clone@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" - -clone@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - -cloneable-readable@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.2.tgz#d591dee4a8f8bc15da43ce97dceeba13d43e2a65" - dependencies: - inherits "^2.0.1" - process-nextick-args "^2.0.0" - readable-stream "^2.3.5" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - -coa@~1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" - dependencies: - q "^1.1.2" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.3.0, color-convert@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" - dependencies: - color-name "^1.1.1" - -color-name@^1.0.0, color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - -color-string@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" - dependencies: - color-name "^1.0.0" - -color@^0.11.0: - version "0.11.4" - resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" - dependencies: - clone "^1.0.2" - color-convert "^1.3.0" - color-string "^0.3.0" - -colormin@^1.0.5: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" - dependencies: - color "^0.11.0" - css-color-names "0.0.4" - has "^1.0.1" - -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" - -colors@^1.1.2, colors@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" - dependencies: - delayed-stream "~1.0.0" - -commander@^2.11.0, commander@^2.9.0: - version "2.14.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" - -commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - -compare-func@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" - dependencies: - array-ify "^1.0.0" - dot-prop "^3.0.0" - -component-emitter@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - -compressible@~2.0.13: - version "2.0.13" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" - dependencies: - mime-db ">= 1.33.0 < 2" - -compression@^1.5.2: - version "1.7.2" - resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" - dependencies: - accepts "~1.3.4" - bytes "3.0.0" - compressible "~2.0.13" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.1" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -concat-stream@^1.4.10, concat-stream@^1.4.7, concat-stream@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -concat-stream@^1.5.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.1.tgz#261b8f518301f1d834e36342b9fea095d2620a26" - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -configstore@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.1.tgz#094ee662ab83fad9917678de114faaea8fcdca90" - dependencies: - dot-prop "^4.1.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - unique-string "^1.0.0" - write-file-atomic "^2.0.0" - xdg-basedir "^3.0.0" - -connect-history-api-fallback@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - -contains-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - -content-type-parser@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - -conventional-changelog-angular@^1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.6.2.tgz#0a811313de46326e5e4e11dac281d61cfe1f00c4" - dependencies: - compare-func "^1.3.1" - q "^1.4.1" - -conventional-changelog-atom@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.2.0.tgz#72f18e5c74e3d8807411252fe013818ddffa7157" - dependencies: - q "^1.4.1" - -conventional-changelog-codemirror@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.0.tgz#4dd8abb9f521a638cab49f683496c26b8a5c6d31" - dependencies: - q "^1.4.1" - -conventional-changelog-core@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-2.0.1.tgz#7573de89bde46e0ccf395b4b85a0869aa5388e8d" - dependencies: - conventional-changelog-writer "^3.0.0" - conventional-commits-parser "^2.1.1" - dateformat "^1.0.12" - get-pkg-repo "^1.0.0" - git-raw-commits "^1.3.0" - git-remote-origin-url "^2.0.0" - git-semver-tags "^1.3.0" - lodash "^4.0.0" - normalize-package-data "^2.3.5" - q "^1.4.1" - read-pkg "^1.1.0" - read-pkg-up "^1.0.1" - through2 "^2.0.0" - -conventional-changelog-ember@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.3.2.tgz#d3dd89ffe96832384a5d3b60dc63bf5e0142a944" - dependencies: - q "^1.4.1" - -conventional-changelog-eslint@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.0.tgz#c63cd9d6f09d4e204530ae7369d7a20a167bc6bc" - dependencies: - q "^1.4.1" - -conventional-changelog-express@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.3.0.tgz#5ed006f48682d8615ee0ab5f53cacb26fbd3e1c8" - dependencies: - q "^1.4.1" - -conventional-changelog-jquery@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510" - dependencies: - q "^1.4.1" - -conventional-changelog-jscs@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c" - dependencies: - q "^1.4.1" - -conventional-changelog-jshint@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.0.tgz#0393fd468113baf73cba911d17c5826423366a28" - dependencies: - compare-func "^1.3.1" - q "^1.4.1" - -conventional-changelog-preset-loader@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.2.tgz#dfb5877884ef852b648bdef6e69e53e1bda188df" - -conventional-changelog-writer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-3.0.0.tgz#e106154ed94341e387d717b61be2181ff53254cc" - dependencies: - compare-func "^1.3.1" - conventional-commits-filter "^1.1.1" - dateformat "^1.0.11" - handlebars "^4.0.2" - json-stringify-safe "^5.0.1" - lodash "^4.0.0" - meow "^3.3.0" - semver "^5.0.1" - split "^1.0.0" - through2 "^2.0.0" - -conventional-changelog@^1.1.0: - version "1.1.12" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.12.tgz#d21172b33f50d7974dd424d5061a3bd48994de0d" - dependencies: - conventional-changelog-angular "^1.6.2" - conventional-changelog-atom "^0.2.0" - conventional-changelog-codemirror "^0.3.0" - conventional-changelog-core "^2.0.1" - conventional-changelog-ember "^0.3.2" - conventional-changelog-eslint "^1.0.0" - conventional-changelog-express "^0.3.0" - conventional-changelog-jquery "^0.1.0" - conventional-changelog-jscs "^0.1.0" - conventional-changelog-jshint "^0.3.0" - conventional-changelog-preset-loader "^1.1.2" - -conventional-commits-filter@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.1.1.tgz#72172319c0c88328a015b30686b55527b3a5e54a" - dependencies: - is-subset "^0.1.1" - modify-values "^1.0.0" - -conventional-commits-parser@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.1.tgz#1525a01bdad3349297b4210396e283d8a8ffd044" - dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.0" - lodash "^4.2.1" - meow "^3.3.0" - split2 "^2.0.0" - through2 "^2.0.0" - trim-off-newlines "^1.0.0" - -conventional-recommended-bump@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.2.1.tgz#1b7137efb5091f99fe009e2fe9ddb7cc490e9375" - dependencies: - concat-stream "^1.4.10" - conventional-commits-filter "^1.1.1" - conventional-commits-parser "^2.1.1" - git-raw-commits "^1.3.0" - git-semver-tags "^1.3.0" - meow "^3.3.0" - object-assign "^4.0.1" - -convert-source-map@^1.4.0, convert-source-map@^1.5.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - -core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0: - version "2.5.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -cosmiconfig@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" - dependencies: - is-directory "^0.3.1" - js-yaml "^3.9.0" - parse-json "^4.0.0" - require-from-string "^2.0.1" - -cp-file@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-4.2.0.tgz#715361663b71ede0b6dddbc3c80e2ba02e725ec3" - dependencies: - graceful-fs "^4.1.2" - make-dir "^1.0.0" - nested-error-stacks "^2.0.0" - pify "^2.3.0" - safe-buffer "^5.0.1" - -create-ecdh@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-error-class@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" - dependencies: - capture-stack-trace "^1.0.0" - -create-hash@^1.1.0, create-hash@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - ripemd160 "^2.0.0" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.6" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-env@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.1.3.tgz#f8ae18faac87692b0a8b4d2f7000d4ec3a85dfd7" - dependencies: - cross-spawn "^5.1.0" - is-windows "^1.0.0" - -cross-spawn@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - -cross-spawn@^5.0.1, cross-spawn@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - -cryptiles@3.x.x: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" - dependencies: - boom "5.x.x" - -crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" - -css-color-names@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - -css-loader@^0.28.10: - version "0.28.10" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.10.tgz#40282e79230f7bcb4e483efa631d670b735ebf42" - dependencies: - babel-code-frame "^6.26.0" - css-selector-tokenizer "^0.7.0" - cssnano "^3.10.0" - icss-utils "^2.1.0" - loader-utils "^1.0.2" - lodash.camelcase "^4.3.0" - object-assign "^4.1.1" - postcss "^5.0.6" - postcss-modules-extract-imports "^1.2.0" - postcss-modules-local-by-default "^1.2.0" - postcss-modules-scope "^1.1.0" - postcss-modules-values "^1.3.0" - postcss-value-parser "^3.3.0" - source-list-map "^2.0.0" - -css-selector-tokenizer@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" - dependencies: - cssesc "^0.1.0" - fastparse "^1.1.1" - regexpu-core "^1.0.0" - -cssesc@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" - -cssnano@^3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" - dependencies: - autoprefixer "^6.3.1" - decamelize "^1.1.2" - defined "^1.0.0" - has "^1.0.1" - object-assign "^4.0.1" - postcss "^5.0.14" - postcss-calc "^5.2.0" - postcss-colormin "^2.1.8" - postcss-convert-values "^2.3.4" - postcss-discard-comments "^2.0.4" - postcss-discard-duplicates "^2.0.1" - postcss-discard-empty "^2.0.1" - postcss-discard-overridden "^0.1.1" - postcss-discard-unused "^2.2.1" - postcss-filter-plugins "^2.0.0" - postcss-merge-idents "^2.1.5" - postcss-merge-longhand "^2.0.1" - postcss-merge-rules "^2.0.3" - postcss-minify-font-values "^1.0.2" - postcss-minify-gradients "^1.0.1" - postcss-minify-params "^1.0.4" - postcss-minify-selectors "^2.0.4" - postcss-normalize-charset "^1.1.0" - postcss-normalize-url "^3.0.7" - postcss-ordered-values "^2.1.0" - postcss-reduce-idents "^2.2.2" - postcss-reduce-initial "^1.0.0" - postcss-reduce-transforms "^1.0.3" - postcss-svgo "^2.1.1" - postcss-unique-selectors "^2.0.2" - postcss-value-parser "^3.2.3" - postcss-zindex "^2.0.1" - -csso@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" - dependencies: - clap "^1.0.9" - source-map "^0.5.3" - -cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.2" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" - -"cssstyle@>= 0.2.37 < 0.3.0": - version "0.2.37" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" - dependencies: - cssom "0.3.x" - -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - dependencies: - array-find-index "^1.0.1" - -cvss@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cvss/-/cvss-1.0.2.tgz#df67e92bf12a796f49e928799c8db3ba74b9fcd6" - -cyclist@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" - -dargs@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" - dependencies: - number-is-nan "^1.0.0" - -dargs@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - -date-fns@^1.27.2: - version "1.29.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - -dateformat@^1.0.11, dateformat@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" - dependencies: - get-stdin "^4.0.1" - meow "^3.3.0" - -dateformat@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - -debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - dependencies: - ms "2.0.0" - -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - -decompress-response@^3.2.0, decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - dependencies: - mimic-response "^1.0.0" - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - -deep-equal@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - -deep-extend@^0.4.0, deep-extend@~0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" - -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" - dependencies: - strip-bom "^2.0.0" - -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" - dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -defined@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - -del-cli@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/del-cli/-/del-cli-1.1.0.tgz#27557d69a0b7df99dcbaa1e34a09e6ac6591d2c4" - dependencies: - del "^3.0.0" - meow "^3.6.0" - update-notifier "^2.1.0" - -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - -del@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" - dependencies: - globby "^6.1.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - p-map "^1.1.1" - pify "^3.0.0" - rimraf "^2.2.8" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -depd@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" - -depd@~1.1.1, depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - -des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - -detect-conflict@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/detect-conflict/-/detect-conflict-1.0.1.tgz#088657a66a961c05019db7c4230883b1c6b4176e" - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - -detect-newline@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - -detect-node@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" - -diff@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" - -diff@^3.3.1, diff@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - -diffie-hellman@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - -dns-packet@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" - dependencies: - ip "^1.1.0" - safe-buffer "^5.0.1" - -dns-txt@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" - dependencies: - buffer-indexof "^1.0.0" - -doctrine@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" - dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - dependencies: - esutils "^2.0.2" - -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - -domexception@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - dependencies: - webidl-conversions "^4.0.2" - -dot-prop@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" - dependencies: - is-obj "^1.0.0" - -dot-prop@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - dependencies: - is-obj "^1.0.0" - -dotgitignore@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-1.0.3.tgz#a442cbde7dc20dff51cdb849e4c5a64568c07923" - dependencies: - find-up "^2.1.0" - minimatch "^3.0.4" - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - -duplexify@^3.4.2, duplexify@^3.5.3: - version "3.5.4" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.4.tgz#4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4" - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - -editions@^1.3.3: - version "1.3.4" - resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - -ejs@^2.3.1: - version "2.5.8" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.8.tgz#2ab6954619f225e6193b7ac5f7c39c48fefe4380" - -electron-to-chromium@^1.2.7: - version "1.3.34" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.34.tgz#d93498f40391bb0c16a603d8241b9951404157ed" - -electron-to-chromium@^1.3.30: - version "1.3.33" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz#bf00703d62a7c65238136578c352d6c5c042a545" - -elegant-spinner@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" - -elliptic@^6.0.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - dependencies: - once "^1.4.0" - -enhanced-resolve@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz#e34a6eaa790f62fccd71d93959f56b2b432db10a" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - tapable "^1.0.0" - -errno@^0.1.3: - version "0.1.6" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.6.tgz#c386ce8a6283f14fc09563b71560908c9bf53026" - dependencies: - prr "~1.0.1" - -errno@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - dependencies: - prr "~1.0.1" - -error-ex@^1.2.0, error-ex@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" - dependencies: - is-arrayish "^0.2.1" - -error@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02" - dependencies: - string-template "~0.2.1" - xtend "~4.0.0" - -es-abstract@^1.5.1: - version "1.10.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-abstract@^1.7.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" - dependencies: - is-callable "^1.1.1" - is-date-object "^1.0.1" - is-symbol "^1.0.1" - -es6-promise@^4.0.3: - version "4.2.4" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - dependencies: - es6-promise "^4.0.3" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -escodegen@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852" - dependencies: - esprima "^3.1.3" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.5.6" - -eslint-config-webpack@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/eslint-config-webpack/-/eslint-config-webpack-1.2.5.tgz#1705686433ebc1a80030cb307d1c53e3e8146e76" - -eslint-import-resolver-node@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" - dependencies: - debug "^2.6.9" - resolve "^1.5.0" - -eslint-module-utils@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz#abaec824177613b8a95b299639e1b6facf473449" - dependencies: - debug "^2.6.8" - pkg-dir "^1.0.0" - -eslint-plugin-import@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz#fa1b6ef31fcb3c501c09859c1b86f1fc5b986894" - dependencies: - builtin-modules "^1.1.1" - contains-path "^0.1.0" - debug "^2.6.8" - doctrine "1.5.0" - eslint-import-resolver-node "^0.3.1" - eslint-module-utils "^2.1.1" - has "^1.0.1" - lodash.cond "^4.3.0" - minimatch "^3.0.3" - read-pkg-up "^2.0.0" - -eslint-scope@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint-visitor-keys@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" - -eslint@^4.17.0: - version "4.17.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.17.0.tgz#dc24bb51ede48df629be7031c71d9dc0ee4f3ddf" - dependencies: - ajv "^5.3.0" - babel-code-frame "^6.22.0" - chalk "^2.1.0" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" - debug "^3.1.0" - doctrine "^2.1.0" - eslint-scope "^3.7.1" - eslint-visitor-keys "^1.0.0" - espree "^3.5.2" - esquery "^1.0.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^11.0.1" - ignore "^3.3.3" - imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.9.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" - pluralize "^7.0.0" - progress "^2.0.0" - require-uncached "^1.0.3" - semver "^5.3.0" - strip-ansi "^4.0.0" - strip-json-comments "~2.0.1" - table "^4.0.1" - text-table "~0.2.0" - -espree@^3.5.2: - version "3.5.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.3.tgz#931e0af64e7fbbed26b050a29daad1fc64799fa6" - dependencies: - acorn "^5.4.0" - acorn-jsx "^3.0.0" - -esprima@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - -esprima@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - -esprima@^4.0.0, esprima@~4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" - -esquery@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" - dependencies: - estraverse "^4.0.0" - -esrecurse@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" - dependencies: - estraverse "^4.1.0" - object-assign "^4.0.1" - -estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - -eventemitter3@1.x.x: - version "1.2.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" - -events@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - -eventsource@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" - dependencies: - original ">=0.0.5" - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -exec-sh@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" - dependencies: - merge "^1.1.3" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" - dependencies: - homedir-polyfill "^1.0.1" - -expect@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-22.2.2.tgz#6cb6ae2eeb651a4187b9096de70333a018fab63f" - dependencies: - ansi-styles "^3.2.0" - jest-diff "^22.1.0" - jest-get-type "^22.1.0" - jest-matcher-utils "^22.2.0" - jest-message-util "^22.2.0" - jest-regex-util "^22.1.0" - -express@^4.16.2: - version "4.16.3" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53" - dependencies: - accepts "~1.3.5" - array-flatten "1.1.1" - body-parser "1.18.2" - content-disposition "0.5.2" - content-type "~1.0.4" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.1.1" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" - path-to-regexp "0.1.7" - proxy-addr "~2.0.3" - qs "6.5.1" - range-parser "~1.2.0" - safe-buffer "5.1.1" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" - utils-merge "1.0.1" - vary "~1.1.2" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - -external-editor@^2.0.4, external-editor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" - dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" - tmp "^0.0.33" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - -fast-deep-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - -fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - -fastparse@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" - -faye-websocket@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" - dependencies: - websocket-driver ">=0.5.1" - -faye-websocket@~0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" - dependencies: - websocket-driver ">=0.5.1" - -fb-watchman@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" - dependencies: - bser "^2.0.0" - -figures@^1.5.0, figures@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" - dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fileset@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" - dependencies: - glob "^7.0.3" - minimatch "^3.0.3" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -finalhandler@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.4.0" - unpipe "~1.0.0" - -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" - dependencies: - commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" - -find-parent-dir@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.0.0, find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - dependencies: - locate-path "^2.0.0" - -first-chunk-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz#1bdecdb8e083c0664b91945581577a43a9f31d70" - dependencies: - readable-stream "^2.0.2" - -flat-cache@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" - dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" - -flatten@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" - -flow-parser@^0.*: - version "0.68.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.68.0.tgz#9cc96620a102e316a314b6bcd56205ceace862d8" - -flush-write-stream@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.2.tgz#c81b90d8746766f1a609a46809946c45dd8ae417" - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.4" - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -form-data@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - -from2@^2.1.0, from2@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fs-access@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" - dependencies: - null-check "^1.0.0" - -fs-readdir-recursive@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - -fs-write-stream-atomic@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -fsevents@^1.0.0, fsevents@^1.1.1, fsevents@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.39" - -fstream-ignore@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -function-bind@^1.0.2, function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - -get-own-enumerable-property-symbols@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b" - -get-pkg-repo@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" - dependencies: - hosted-git-info "^2.1.4" - meow "^3.3.0" - normalize-package-data "^2.3.0" - parse-github-repo-url "^1.3.0" - through2 "^2.0.0" - -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - -get-stream@3.0.0, get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - -gh-got@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/gh-got/-/gh-got-6.0.0.tgz#d74353004c6ec466647520a10bd46f7299d268d0" - dependencies: - got "^7.0.0" - is-plain-obj "^1.1.0" - -git-raw-commits@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.0.tgz#0bc8596e90d5ffe736f7f5546bd2d12f73abaac6" - dependencies: - dargs "^4.0.1" - lodash.template "^4.0.2" - meow "^3.3.0" - split2 "^2.0.0" - through2 "^2.0.0" - -git-remote-origin-url@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" - dependencies: - gitconfiglocal "^1.0.0" - pify "^2.3.0" - -git-semver-tags@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.3.0.tgz#b154833a6ab5c360c0ad3b1aa9b8f12ea06de919" - dependencies: - meow "^3.3.0" - semver "^5.0.1" - -gitconfiglocal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" - dependencies: - ini "^1.3.2" - -github-username@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/github-username/-/github-username-4.1.0.tgz#cbe280041883206da4212ae9e4b5f169c30bf417" - dependencies: - gh-got "^6.0.0" - -glob-all@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-all/-/glob-all-3.1.0.tgz#8913ddfb5ee1ac7812656241b03d5217c64b02ab" - dependencies: - glob "^7.0.5" - yargs "~1.2.6" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-dirs@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" - dependencies: - ini "^1.3.4" - -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" - -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" - -globals@^11.0.1: - version "11.3.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.3.0.tgz#e04fdb7b9796d8adac9c8f64c14837b2313378b0" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -globby@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -got@^6.7.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" - dependencies: - create-error-class "^3.0.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-redirect "^1.0.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - lowercase-keys "^1.0.0" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - unzip-response "^2.0.1" - url-parse-lax "^1.0.0" - -got@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" - dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" - -got@^8.2.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/got/-/got-8.3.0.tgz#6ba26e75f8a6cc4c6b3eb1fe7ce4fec7abac8533" - dependencies: - "@sindresorhus/is" "^0.7.0" - cacheable-request "^2.1.1" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - into-stream "^3.1.0" - is-retry-allowed "^1.1.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - mimic-response "^1.0.0" - p-cancelable "^0.4.0" - p-timeout "^2.0.1" - pify "^3.0.0" - safe-buffer "^5.1.1" - timed-out "^4.0.1" - url-parse-lax "^3.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -grouped-queue@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-0.3.3.tgz#c167d2a5319c5a0e0964ef6a25b7c2df8996c85c" - dependencies: - lodash "^4.17.2" - -growly@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - -handle-thing@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" - -handlebars@^4.0.2, handlebars@^4.0.3: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - -har-validator@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - dependencies: - ajv "^4.9.1" - har-schema "^1.0.5" - -har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -has-color@~0.1.0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - dependencies: - has-symbol-support-x "^1.4.1" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" - dependencies: - function-bind "^1.0.2" - -hash-base@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" - dependencies: - inherits "^2.0.1" - -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.0" - -hawk@3.1.3, hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hawk@~6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - dependencies: - boom "4.x.x" - cryptiles "3.x.x" - hoek "4.x.x" - sntp "2.x.x" - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -hoek@4.x.x: - version "4.2.0" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -homedir-polyfill@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" - dependencies: - parse-passwd "^1.0.0" - -hosted-git-info@^2.1.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" - -hpack.js@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" - dependencies: - inherits "^2.0.1" - obuf "^1.0.0" - readable-stream "^2.0.1" - wbuf "^1.1.0" - -html-comment-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" - -html-encoding-sniffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - dependencies: - whatwg-encoding "^1.0.1" - -html-entities@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" - -http-cache-semantics@3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - -http-deceiver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" - -http-errors@1.6.2, http-errors@~1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" - dependencies: - depd "1.1.1" - inherits "2.0.3" - setprototypeof "1.0.3" - statuses ">= 1.3.1 < 2" - -http-parser-js@>=0.4.0: - version "0.4.11" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.11.tgz#5b720849c650903c27e521633d94696ee95f3529" - -http-proxy-middleware@~0.17.4: - version "0.17.4" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833" - dependencies: - http-proxy "^1.16.2" - is-glob "^3.1.0" - lodash "^4.17.2" - micromatch "^2.3.11" - -http-proxy@^1.16.2: - version "1.16.2" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" - dependencies: - eventemitter3 "1.x.x" - requires-port "1.x.x" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - -https-proxy-agent@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.1.1.tgz#a7ce4382a1ba8266ee848578778122d491260fd9" - dependencies: - agent-base "^4.1.0" - debug "^3.1.0" - -iconv-lite@0.4.19, iconv-lite@^0.4.17: - version "0.4.19" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" - -icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - -icss-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" - dependencies: - postcss "^6.0.1" - -ieee754@^1.1.4: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - -ignore@^3.3.3: - version "3.3.7" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" - -import-lazy@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" - -import-local@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" - dependencies: - pkg-dir "^2.0.0" - resolve-cwd "^2.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - dependencies: - repeating "^2.0.0" - -indent-string@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - -inquirer@^3.0.6, inquirer@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.0.4" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - -inquirer@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.1.0.tgz#19da508931892328abbbdd4c477f1efc65abfd67" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.1.0" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^5.5.2" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - -internal-ip@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" - dependencies: - meow "^3.3.0" - -interpret@^1.0.0, interpret@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" - -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" - dependencies: - from2 "^2.1.1" - p-is-promise "^1.1.0" - -invariant@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - -ip@^1.1.0, ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - -ipaddr.js@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.6.0.tgz#e3fa357b773da619f26e95f049d055c72796f86b" - -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - dependencies: - builtin-modules "^1.0.0" - -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" - -is-ci@^1.0.10: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" - dependencies: - ci-info "^1.0.0" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - -is-generator-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - dependencies: - is-extglob "^2.1.1" - -is-installed-globally@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" - dependencies: - global-dirs "^0.1.0" - is-path-inside "^1.0.0" - -is-npm@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - -is-obj@^1.0.0, is-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - -is-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" - -is-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-0.2.0.tgz#b361311d83c6e5d726cabf5e250b0237106f5ae2" - dependencies: - symbol-observable "^0.2.2" - -is-odd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" - dependencies: - is-number "^4.0.0" - -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - -is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" - dependencies: - is-path-inside "^1.0.0" - -is-path-inside@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" - dependencies: - path-is-inside "^1.0.1" - -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - -is-redirect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - dependencies: - has "^1.0.1" - -is-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" - -is-resolvable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - -is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - -is-scoped@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-scoped/-/is-scoped-1.0.0.tgz#449ca98299e713038256289ecb2b540dc437cb30" - dependencies: - scoped-regex "^1.0.0" - -is-stream@^1.0.0, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - -is-subset@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" - -is-svg@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" - dependencies: - html-comment-regex "^1.1.0" - -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" - -is-text-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" - dependencies: - text-extensions "^1.0.0" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - -is-windows@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9" - -is-windows@^1.0.1, is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -istanbul-api@^1.1.14: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.2.tgz#e17cd519dd5ec4141197f246fdf380b75487f3b1" - dependencies: - async "^2.1.4" - fileset "^2.0.2" - istanbul-lib-coverage "^1.1.2" - istanbul-lib-hook "^1.1.0" - istanbul-lib-instrument "^1.9.2" - istanbul-lib-report "^1.1.3" - istanbul-lib-source-maps "^1.2.3" - istanbul-reports "^1.1.4" - js-yaml "^3.7.0" - mkdirp "^0.5.1" - once "^1.4.0" - -istanbul-lib-coverage@^1.1.1, istanbul-lib-coverage@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz#4113c8ff6b7a40a1ef7350b01016331f63afde14" - -istanbul-lib-hook@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" - dependencies: - append-transform "^0.4.0" - -istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0, istanbul-lib-instrument@^1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz#84905bf47f7e0b401d6b840da7bad67086b4aab6" - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.1.2" - semver "^5.3.0" - -istanbul-lib-report@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259" - dependencies: - istanbul-lib-coverage "^1.1.2" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.1.2" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - -istanbul-reports@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.4.tgz#5ccba5e22b7b5a5d91d5e0a830f89be334bf97bd" - dependencies: - handlebars "^4.0.3" - -istextorbinary@^2.1.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-2.2.1.tgz#a5231a08ef6dd22b268d0895084cf8d58b5bec53" - dependencies: - binaryextensions "2" - editions "^1.3.3" - textextensions "2" - -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -jest-changed-files@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.2.0.tgz#517610c4a8ca0925bdc88b0ca53bd678aa8d019e" - dependencies: - throat "^4.0.0" - -jest-cli@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.2.2.tgz#4431a93a29549da5dcb6d4a41dd03503c9198cd6" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.1" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.1.11" - import-local "^1.0.0" - is-ci "^1.0.10" - istanbul-api "^1.1.14" - istanbul-lib-coverage "^1.1.1" - istanbul-lib-instrument "^1.8.0" - istanbul-lib-source-maps "^1.2.1" - jest-changed-files "^22.2.0" - jest-config "^22.2.2" - jest-environment-jsdom "^22.2.2" - jest-get-type "^22.1.0" - jest-haste-map "^22.2.2" - jest-message-util "^22.2.0" - jest-regex-util "^22.1.0" - jest-resolve-dependencies "^22.1.0" - jest-runner "^22.2.2" - jest-runtime "^22.2.2" - jest-snapshot "^22.2.0" - jest-util "^22.2.2" - jest-worker "^22.2.2" - micromatch "^2.3.11" - node-notifier "^5.2.1" - realpath-native "^1.0.0" - rimraf "^2.5.4" - slash "^1.0.0" - string-length "^2.0.0" - strip-ansi "^4.0.0" - which "^1.2.12" - yargs "^10.0.3" - -jest-config@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.2.2.tgz#6b8ed615bc51239847d15460086f174dad4a7015" - dependencies: - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^22.2.2" - jest-environment-node "^22.2.2" - jest-get-type "^22.1.0" - jest-jasmine2 "^22.2.2" - jest-regex-util "^22.1.0" - jest-resolve "^22.2.2" - jest-util "^22.2.2" - jest-validate "^22.2.2" - pretty-format "^22.1.0" - -jest-diff@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.1.0.tgz#0fad9d96c87b453896bf939df3dc8aac6919ac38" - dependencies: - chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.1.0" - pretty-format "^22.1.0" - -jest-docblock@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.2.2.tgz#617f13edb16ec64202002b3c336cd14ae36c0631" - dependencies: - detect-newline "^2.1.0" - -jest-environment-jsdom@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.2.2.tgz#3513ccdccc2bc41daf9cdee199b7069b0d9feebc" - dependencies: - jest-mock "^22.2.0" - jest-util "^22.2.2" - jsdom "^11.5.1" - -jest-environment-node@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.2.2.tgz#570896eef2dd0f939c71bd5712ef4321958c1270" - dependencies: - jest-mock "^22.2.0" - jest-util "^22.2.2" - -jest-get-type@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" - -jest-get-type@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" - -jest-haste-map@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.2.2.tgz#9d3d5a14bd5e05ab9176979f2a5fbb4ddc80eb20" - dependencies: - fb-watchman "^2.0.0" - graceful-fs "^4.1.11" - jest-docblock "^22.2.2" - jest-worker "^22.2.2" - micromatch "^2.3.11" - sane "^2.0.0" - -jest-jasmine2@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.2.2.tgz#9065255c8f635ae9dfa33fc66068f59adf53c9aa" - dependencies: - callsites "^2.0.0" - chalk "^2.0.1" - co "^4.6.0" - expect "^22.2.2" - graceful-fs "^4.1.11" - is-generator-fn "^1.0.0" - jest-diff "^22.1.0" - jest-matcher-utils "^22.2.0" - jest-message-util "^22.2.0" - jest-snapshot "^22.2.0" - source-map-support "^0.5.0" - -jest-leak-detector@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.1.0.tgz#08376644cee07103da069baac19adb0299b772c2" - dependencies: - pretty-format "^22.1.0" - -jest-matcher-utils@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.2.0.tgz#5390f823c18c748543d463825aa8e4df0db253ca" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - pretty-format "^22.1.0" - -jest-message-util@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.2.0.tgz#84a6bb34186d8b9af7e0732fabbef63f7355f7b2" - dependencies: - "@babel/code-frame" "^7.0.0-beta.35" - chalk "^2.0.1" - micromatch "^2.3.11" - slash "^1.0.0" - stack-utils "^1.0.1" - -jest-mock@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.2.0.tgz#444b3f9488a7473adae09bc8a77294afded397a7" - -jest-regex-util@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.1.0.tgz#5daf2fe270074b6da63e5d85f1c9acc866768f53" - -jest-resolve-dependencies@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.1.0.tgz#340e4139fb13315cd43abc054e6c06136be51e31" - dependencies: - jest-regex-util "^22.1.0" - -jest-resolve@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.2.2.tgz#6f49d91e3680c86a4d5e5f72ccdab3996d1cbc19" - dependencies: - browser-resolve "^1.11.2" - chalk "^2.0.1" - -jest-runner@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.2.2.tgz#17fff27a61b63b58cf104c9cdcc0fdfccd3878ce" - dependencies: - exit "^0.1.2" - jest-config "^22.2.2" - jest-docblock "^22.2.2" - jest-haste-map "^22.2.2" - jest-jasmine2 "^22.2.2" - jest-leak-detector "^22.1.0" - jest-message-util "^22.2.0" - jest-runtime "^22.2.2" - jest-util "^22.2.2" - jest-worker "^22.2.2" - throat "^4.0.0" - -jest-runtime@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.2.2.tgz#256d0efb65deae1c23b819d88cec5ab43d7a4ed6" - dependencies: - babel-core "^6.0.0" - babel-jest "^22.2.2" - babel-plugin-istanbul "^4.1.5" - chalk "^2.0.1" - convert-source-map "^1.4.0" - exit "^0.1.2" - graceful-fs "^4.1.11" - jest-config "^22.2.2" - jest-haste-map "^22.2.2" - jest-regex-util "^22.1.0" - jest-resolve "^22.2.2" - jest-util "^22.2.2" - json-stable-stringify "^1.0.1" - micromatch "^2.3.11" - realpath-native "^1.0.0" - slash "^1.0.0" - strip-bom "3.0.0" - write-file-atomic "^2.1.0" - yargs "^10.0.3" - -jest-snapshot@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.2.0.tgz#0c0ba152d296ef70fa198cc84977a2cc269ee4cf" - dependencies: - chalk "^2.0.1" - jest-diff "^22.1.0" - jest-matcher-utils "^22.2.0" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - pretty-format "^22.1.0" - -jest-util@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.2.2.tgz#335484b6aeae0c5a1ae498401630324977fe3465" - dependencies: - callsites "^2.0.0" - chalk "^2.0.1" - graceful-fs "^4.1.11" - is-ci "^1.0.10" - jest-message-util "^22.2.0" - jest-validate "^22.2.2" - mkdirp "^0.5.1" - -jest-validate@^21.1.0: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" - dependencies: - chalk "^2.0.1" - jest-get-type "^21.2.0" - leven "^2.1.0" - pretty-format "^21.2.1" - -jest-validate@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.2.2.tgz#9cdce422c93cc28395e907ac6bbc929158d9a6ba" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^22.1.0" - -jest-worker@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.2.2.tgz#c1f5dc39976884b81f68ec50cb8532b2cbab3390" - dependencies: - merge-stream "^1.0.1" - -jest@^22.2.2: - version "22.2.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-22.2.2.tgz#26aca0f5e4eaa76d52f2792b14033a3d1e7be2bd" - dependencies: - import-local "^1.0.0" - jest-cli "^22.2.2" - -js-base64@^2.1.9: - version "2.4.3" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" - -js-tokens@^3.0.0, js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - -js-yaml@^3.7.0, js-yaml@^3.8.2, js-yaml@^3.9.0, js-yaml@^3.9.1: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@~3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - -jscodeshift@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.4.1.tgz#da91a1c2eccfa03a3387a21d39948e251ced444a" - dependencies: - async "^1.5.0" - babel-plugin-transform-flow-strip-types "^6.8.0" - babel-preset-es2015 "^6.9.0" - babel-preset-stage-1 "^6.5.0" - babel-register "^6.9.0" - babylon "^6.17.3" - colors "^1.1.2" - flow-parser "^0.*" - lodash "^4.13.1" - micromatch "^2.3.7" - node-dir "0.1.8" - nomnom "^1.8.1" - recast "^0.12.5" - temp "^0.8.1" - write-file-atomic "^1.2.0" - -jscodeshift@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.5.0.tgz#bdb7b6cc20dd62c16aa728c3fa2d2fe66ca7c748" - dependencies: - babel-plugin-transform-flow-strip-types "^6.8.0" - babel-preset-es2015 "^6.9.0" - babel-preset-stage-1 "^6.5.0" - babel-register "^6.9.0" - babylon "^7.0.0-beta.30" - colors "^1.1.2" - flow-parser "^0.*" - lodash "^4.13.1" - micromatch "^2.3.7" - neo-async "^2.5.0" - node-dir "0.1.8" - nomnom "^1.8.1" - recast "^0.14.1" - temp "^0.8.1" - write-file-atomic "^1.2.0" - -jsdom@^11.5.1: - version "11.6.2" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.6.2.tgz#25d1ef332d48adf77fc5221fe2619967923f16bb" - dependencies: - abab "^1.0.4" - acorn "^5.3.0" - acorn-globals "^4.1.0" - array-equal "^1.0.0" - browser-process-hrtime "^0.1.2" - content-type-parser "^1.0.2" - cssom ">= 0.3.2 < 0.4.0" - cssstyle ">= 0.2.37 < 0.3.0" - domexception "^1.0.0" - escodegen "^1.9.0" - html-encoding-sniffer "^1.0.2" - left-pad "^1.2.0" - nwmatcher "^1.4.3" - parse5 "4.0.0" - pn "^1.1.0" - request "^2.83.0" - request-promise-native "^1.0.5" - sax "^1.2.4" - symbol-tree "^3.2.2" - tough-cookie "^2.3.3" - w3c-hr-time "^1.0.1" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.3" - whatwg-url "^6.4.0" - ws "^4.0.0" - xml-name-validator "^3.0.0" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - -json-parse-better-errors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz#50183cd1b2d25275de069e9e71b467ac9eab973a" - -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -json3@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -jsonparse@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -keyv@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" - dependencies: - json-buffer "3.0.0" - -killable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - -latest-version@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" - dependencies: - package-json "^4.0.0" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -lazy-cache@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" - dependencies: - set-getter "^0.1.0" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - dependencies: - invert-kv "^1.0.0" - -left-pad@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" - -leven@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - -levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -lint-staged@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-6.1.0.tgz#28f600c10a6cbd249ceb003118a1552e53544a93" - dependencies: - app-root-path "^2.0.0" - chalk "^2.1.0" - commander "^2.11.0" - cosmiconfig "^4.0.0" - debug "^3.1.0" - dedent "^0.7.0" - execa "^0.8.0" - find-parent-dir "^0.3.0" - is-glob "^4.0.0" - jest-validate "^21.1.0" - listr "^0.13.0" - lodash "^4.17.4" - log-symbols "^2.0.0" - minimatch "^3.0.0" - npm-which "^3.0.1" - p-map "^1.1.1" - path-is-inside "^1.0.2" - pify "^3.0.0" - staged-git-files "0.0.4" - stringify-object "^3.2.0" - -listr-silent-renderer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" - -listr-update-renderer@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - elegant-spinner "^1.0.1" - figures "^1.7.0" - indent-string "^3.0.0" - log-symbols "^1.0.2" - log-update "^1.0.2" - strip-ansi "^3.0.1" - -listr-verbose-renderer@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" - dependencies: - chalk "^1.1.3" - cli-cursor "^1.0.2" - date-fns "^1.27.2" - figures "^1.7.0" - -listr@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.13.0.tgz#20bb0ba30bae660ee84cc0503df4be3d5623887d" - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - figures "^1.7.0" - indent-string "^2.1.0" - is-observable "^0.2.0" - is-promise "^2.1.0" - is-stream "^1.1.0" - listr-silent-renderer "^1.1.1" - listr-update-renderer "^0.4.0" - listr-verbose-renderer "^0.4.0" - log-symbols "^1.0.2" - log-update "^1.0.2" - ora "^0.2.3" - p-map "^1.1.1" - rxjs "^5.4.2" - stream-to-observable "^0.2.0" - strip-ansi "^3.0.1" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - -loader-runner@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" - -loader-utils@^1.0.2, loader-utils@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -lodash._reinterpolate@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - -lodash.cond@^4.3.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - -lodash.template@^4.0.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" - dependencies: - lodash._reinterpolate "~3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" - dependencies: - lodash._reinterpolate "~3.0.0" - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - -lodash@^3.10.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: - version "4.17.5" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" - -log-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" - dependencies: - chalk "^1.0.0" - -log-symbols@^2.0.0, log-symbols@^2.1.0, log-symbols@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - dependencies: - chalk "^2.0.1" - -log-update@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" - dependencies: - ansi-escapes "^1.0.0" - cli-cursor "^1.0.2" - -loglevel@^1.4.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" - -loglevelnext@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/loglevelnext/-/loglevelnext-1.0.3.tgz#0f69277e73bbbf2cd61b94d82313216bf87ac66e" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -loose-envify@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - dependencies: - js-tokens "^3.0.0" - -loud-rejection@^1.0.0, loud-rejection@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - -lowercase-keys@1.0.0, lowercase-keys@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" - -lru-cache@^4.0.1, lru-cache@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -macaddress@^0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" - -make-dir@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.1.0.tgz#19b4369fe48c116f53c2af95ad102c0e39e85d51" - dependencies: - pify "^3.0.0" - -make-dir@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b" - dependencies: - pify "^3.0.0" - -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" - dependencies: - tmpl "1.0.x" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - -map-obj@^1.0.0, map-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - dependencies: - object-visit "^1.0.0" - -math-expression-evaluator@^1.2.14: - version "1.2.17" - resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" - -md5.js@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - -mem-fs-editor@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-3.0.2.tgz#dd0a6eaf2bb8a6b37740067aa549eb530105af9f" - dependencies: - commondir "^1.0.1" - deep-extend "^0.4.0" - ejs "^2.3.1" - glob "^7.0.3" - globby "^6.1.0" - mkdirp "^0.5.0" - multimatch "^2.0.0" - rimraf "^2.2.8" - through2 "^2.0.0" - vinyl "^2.0.1" - -mem-fs@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/mem-fs/-/mem-fs-1.1.3.tgz#b8ae8d2e3fcb6f5d3f9165c12d4551a065d989cc" - dependencies: - through2 "^2.0.0" - vinyl "^1.1.0" - vinyl-file "^2.0.0" - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - dependencies: - mimic-fn "^1.0.0" - -memory-fs@^0.4.0, memory-fs@~0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -meow@^3.3.0, meow@^3.6.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - dependencies: - camelcase-keys "^2.0.0" - decamelize "^1.1.2" - loud-rejection "^1.0.0" - map-obj "^1.0.1" - minimist "^1.1.3" - normalize-package-data "^2.3.4" - object-assign "^4.0.1" - read-pkg-up "^1.0.1" - redent "^1.0.0" - trim-newlines "^1.0.0" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - -merge-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" - dependencies: - readable-stream "^2.0.1" - -merge@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - -micromatch@^2.1.5, micromatch@^2.3.11, micromatch@^2.3.7: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.4, micromatch@^3.1.8: - version "3.1.9" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.9.tgz#15dc93175ae39e52e93087847096effc73efcf89" - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - -mime-db@~1.30.0: - version "1.30.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" - -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.7: - version "2.1.17" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" - dependencies: - mime-db "~1.30.0" - -mime-types@~2.1.18: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - dependencies: - mime-db "~1.33.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - -mime@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.2.0.tgz#161e541965551d3b549fa1114391e3a3d55b923b" - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - -mimic-response@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.0.tgz#df3d3652a73fded6b9b0b24146e6fd052353458e" - -minimalistic-assert@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" - -minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - -mississippi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^2.0.1" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - -mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -modify-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2" - -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - -mrm-core@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mrm-core/-/mrm-core-1.1.0.tgz#97df4be3bc208d623519d6a18f18407ef79aa226" - dependencies: - babel-code-frame "^6.22.0" - chalk "^1.1.3" - cp-file "^4.1.1" - js-yaml "^3.8.2" - lodash "^4.17.4" - mkdirp "^0.5.1" - prop-ini "^0.0.2" - readme-badger "^0.1.2" - split-lines "^1.1.0" - strip-bom "^3.0.0" - strip-json-comments "^2.0.1" - webpack-merge "^4.0.0" - yarn-install "^0.2.1" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -multicast-dns-service-types@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" - -multicast-dns@^6.0.1: - version "6.2.3" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" - dependencies: - dns-packet "^1.3.1" - thunky "^1.0.2" - -multimatch@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" - dependencies: - array-differ "^1.0.0" - array-union "^1.0.1" - arrify "^1.0.0" - minimatch "^3.0.0" - -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - -nan@^2.3.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" - -nanomatch@^1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-odd "^2.0.0" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - -neo-async@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.0.tgz#76b1c823130cca26acfbaccc8fbaf0a2fa33b18f" - -nested-error-stacks@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.0.0.tgz#98b2ffaefb4610fa3936f1e71435d30700de2840" - dependencies: - inherits "~2.0.1" - -nice-try@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" - -node-dir@0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.8.tgz#55fb8deb699070707fb67f91a460f0448294c77d" - -node-forge@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.1.tgz#9da611ea08982f4b94206b3beb4cc9665f20c300" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - -node-libs-browser@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^1.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.0" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.10.3" - vm-browserify "0.0.4" - -node-notifier@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" - dependencies: - growly "^1.3.0" - semver "^5.4.1" - shellwords "^0.1.1" - which "^1.3.0" - -node-pre-gyp@^0.6.39: - version "0.6.39" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" - dependencies: - detect-libc "^1.0.2" - hawk "3.1.3" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.0.2" - rc "^1.1.7" - request "2.81.0" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^2.2.1" - tar-pack "^3.4.0" - -nodesecurity-npm-utils@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/nodesecurity-npm-utils/-/nodesecurity-npm-utils-6.0.0.tgz#5fb5974008c0c97a5c01844faa8fd3fc5520806c" - -nomnom@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" - dependencies: - chalk "~0.4.0" - underscore "~1.6.0" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - -normalize-url@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" - dependencies: - prepend-http "^2.0.0" - query-string "^5.0.1" - sort-keys "^2.0.0" - -normalize-url@^1.4.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" - dependencies: - object-assign "^4.0.1" - prepend-http "^1.0.0" - query-string "^4.1.0" - sort-keys "^1.0.0" - -npm-path@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" - dependencies: - which "^1.2.10" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - dependencies: - path-key "^2.0.0" - -npm-which@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" - dependencies: - commander "^2.9.0" - npm-path "^2.0.2" - which "^1.2.10" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -nsp@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/nsp/-/nsp-3.1.0.tgz#e3d168b01258728ef1cb03fea9ec4f0059c8e3f3" - dependencies: - chalk "^2.1.0" - cli-table2 "^0.2.0" - cvss "^1.0.2" - https-proxy-agent "^2.1.0" - inquirer "^3.3.0" - nodesecurity-npm-utils "^6.0.0" - semver "^5.4.1" - wreck "^12.5.1" - yargs "^9.0.1" - -null-check@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" - -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - -nwmatcher@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" - -oauth-sign@~0.8.1, oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-keys@^1.0.8: - version "1.0.11" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - dependencies: - isobject "^3.0.0" - -object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - dependencies: - isobject "^3.0.1" - -obuf@^1.0.0, obuf@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - -once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - dependencies: - mimic-fn "^1.0.0" - -opn@^5.1.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" - dependencies: - is-wsl "^1.1.0" - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -optionator@^0.8.1, optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - -ora@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" - dependencies: - chalk "^1.1.1" - cli-cursor "^1.0.2" - cli-spinners "^0.1.2" - object-assign "^4.0.1" - -original@>=0.0.5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/original/-/original-1.0.0.tgz#9147f93fa1696d04be61e01bd50baeaca656bd3b" - dependencies: - url-parse "1.0.x" - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-shim@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -osenv@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -output-file-sync@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" - dependencies: - graceful-fs "^4.1.4" - mkdirp "^0.5.1" - object-assign "^4.1.0" - -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - -p-cancelable@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.0.tgz#bcb41d35bf6097fc4367a065b6eb84b9b124eff0" - -p-each-series@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" - dependencies: - p-reduce "^1.0.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" - -p-lazy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-lazy/-/p-lazy-1.0.0.tgz#ec53c802f2ee3ac28f166cc82d0b2b02de27a835" - -p-limit@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" - dependencies: - p-try "^1.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - dependencies: - p-limit "^1.1.0" - -p-map@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - -p-timeout@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" - dependencies: - p-finally "^1.0.0" - -p-timeout@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" - dependencies: - p-finally "^1.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - -package-json@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" - dependencies: - got "^6.7.1" - registry-auth-token "^3.0.1" - registry-url "^3.0.3" - semver "^5.1.0" - -pako@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" - -parallel-transform@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" - dependencies: - cyclist "~0.2.2" - inherits "^2.0.3" - readable-stream "^2.1.5" - -parse-asn1@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - -parse-github-repo-url@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - dependencies: - error-ex "^1.2.0" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - -parse5@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" - -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-is-inside@^1.0.1, path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - dependencies: - pify "^2.0.0" - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - dependencies: - pify "^3.0.0" - -pbkdf2@^3.0.3: - version "3.0.14" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - -pify@^2.0.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - -pkg-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" - dependencies: - find-up "^1.0.0" - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - dependencies: - find-up "^2.1.0" - -pluralize@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" - -pn@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" - -portfinder@^1.0.9: - version "1.0.13" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" - dependencies: - async "^1.5.2" - debug "^2.2.0" - mkdirp "0.5.x" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - -postcss-calc@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" - dependencies: - postcss "^5.0.2" - postcss-message-helpers "^2.0.0" - reduce-css-calc "^1.2.6" - -postcss-colormin@^2.1.8: - version "2.2.2" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" - dependencies: - colormin "^1.0.5" - postcss "^5.0.13" - postcss-value-parser "^3.2.3" - -postcss-convert-values@^2.3.4: - version "2.6.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" - dependencies: - postcss "^5.0.11" - postcss-value-parser "^3.1.2" - -postcss-discard-comments@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" - dependencies: - postcss "^5.0.14" - -postcss-discard-duplicates@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" - dependencies: - postcss "^5.0.4" - -postcss-discard-empty@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" - dependencies: - postcss "^5.0.14" - -postcss-discard-overridden@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" - dependencies: - postcss "^5.0.16" - -postcss-discard-unused@^2.2.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" - dependencies: - postcss "^5.0.14" - uniqs "^2.0.0" - -postcss-filter-plugins@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" - dependencies: - postcss "^5.0.4" - uniqid "^4.0.0" - -postcss-merge-idents@^2.1.5: - version "2.1.7" - resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" - dependencies: - has "^1.0.1" - postcss "^5.0.10" - postcss-value-parser "^3.1.1" - -postcss-merge-longhand@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" - dependencies: - postcss "^5.0.4" - -postcss-merge-rules@^2.0.3: - version "2.1.2" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" - dependencies: - browserslist "^1.5.2" - caniuse-api "^1.5.2" - postcss "^5.0.4" - postcss-selector-parser "^2.2.2" - vendors "^1.0.0" - -postcss-message-helpers@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" - -postcss-minify-font-values@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" - dependencies: - object-assign "^4.0.1" - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-minify-gradients@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" - dependencies: - postcss "^5.0.12" - postcss-value-parser "^3.3.0" - -postcss-minify-params@^1.0.4: - version "1.2.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.2" - postcss-value-parser "^3.0.2" - uniqs "^2.0.0" - -postcss-minify-selectors@^2.0.4: - version "2.1.1" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" - dependencies: - alphanum-sort "^1.0.2" - has "^1.0.1" - postcss "^5.0.14" - postcss-selector-parser "^2.0.0" - -postcss-modules-extract-imports@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" - dependencies: - postcss "^6.0.1" - -postcss-modules-local-by-default@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-scope@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-values@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" - dependencies: - icss-replace-symbols "^1.1.0" - postcss "^6.0.1" - -postcss-normalize-charset@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" - dependencies: - postcss "^5.0.5" - -postcss-normalize-url@^3.0.7: - version "3.0.8" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^1.4.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - -postcss-ordered-values@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.1" - -postcss-reduce-idents@^2.2.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-reduce-initial@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" - dependencies: - postcss "^5.0.4" - -postcss-reduce-transforms@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" - dependencies: - has "^1.0.1" - postcss "^5.0.8" - postcss-value-parser "^3.0.1" - -postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-svgo@^2.1.1: - version "2.1.6" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" - dependencies: - is-svg "^2.0.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - svgo "^0.7.0" - -postcss-unique-selectors@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" - -postcss-zindex@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" - dependencies: - has "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: - version "5.2.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" - dependencies: - chalk "^1.1.3" - js-base64 "^2.1.9" - source-map "^0.5.6" - supports-color "^3.2.3" - -postcss@^6.0.1: - version "6.0.19" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.19.tgz#76a78386f670b9d9494a655bf23ac012effd1555" - dependencies: - chalk "^2.3.1" - source-map "^0.6.1" - supports-color "^5.2.0" - -pre-commit@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6" - dependencies: - cross-spawn "^5.0.1" - spawn-sync "^1.0.15" - which "1.2.x" - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - -prepend-http@^1.0.0, prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -prettier@^1.5.3: - version "1.11.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75" - -pretty-bytes@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9" - -pretty-format@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - -pretty-format@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.1.0.tgz#2277605b40ed4529ae4db51ff62f4be817647914" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - -private@^0.1.6, private@^0.1.7, private@~0.1.5: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - -process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - -progress@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" - -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - -prop-ini@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/prop-ini/-/prop-ini-0.0.2.tgz#6733a7cb5242acab2be42e607583d8124b172a5b" - dependencies: - extend "^3.0.0" - -proxy-addr@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341" - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.6.0" - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - -public-encrypt@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - -pump@^2.0.0, pump@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb" - dependencies: - duplexify "^3.5.3" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -punycode@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - -q@^1.1.2, q@^1.4.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - -qs@6.5.1, qs@~6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" - -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - -query-string@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" - dependencies: - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - -querystringify@0.0.x: - version "0.0.4" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" - -querystringify@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" - -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.3.tgz#b96b7df587f01dd91726c418f30553b1418e3d62" - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@^1.0.3, range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - -raw-body@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" - dependencies: - bytes "3.0.0" - http-errors "1.6.2" - iconv-lite "0.4.19" - unpipe "1.0.0" - -rc@^1.0.1, rc@^1.1.6, rc@^1.1.7: - version "1.2.5" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.5.tgz#275cd687f6e3b36cc756baa26dfee80a790301fd" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-chunk@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-2.1.0.tgz#6a04c0928005ed9d42e1a6ac5600e19cbc7ff655" - dependencies: - pify "^3.0.0" - safe-buffer "^5.1.1" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - -read-pkg-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" - dependencies: - find-up "^2.0.0" - read-pkg "^3.0.0" - -read-pkg@^1.0.0, read-pkg@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.4, readable-stream@^2.2.9, readable-stream@^2.3.5: - version "2.3.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" - readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - -readme-badger@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/readme-badger/-/readme-badger-0.1.2.tgz#81b138df9723c733df6a27c7bd9caebd383e08a5" - -realpath-native@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" - dependencies: - util.promisify "^1.0.0" - -recast@^0.12.5: - version "0.12.9" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.12.9.tgz#e8e52bdb9691af462ccbd7c15d5a5113647a15f1" - dependencies: - ast-types "0.10.1" - core-js "^2.4.1" - esprima "~4.0.0" - private "~0.1.5" - source-map "~0.6.1" - -recast@^0.14.1: - version "0.14.7" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.14.7.tgz#4f1497c2b5826d42a66e8e3c9d80c512983ff61d" - dependencies: - ast-types "0.11.3" - esprima "~4.0.0" - private "~0.1.5" - source-map "~0.6.1" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" - -reduce-css-calc@^1.2.6: - version "1.3.0" - resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" - dependencies: - balanced-match "^0.4.2" - math-expression-evaluator "^1.2.14" - reduce-function-call "^1.0.1" - -reduce-function-call@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" - dependencies: - balanced-match "^0.4.2" - -regenerate@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" - -regenerator-runtime@^0.10.5: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - dependencies: - is-equal-shallow "^0.1.3" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexpu-core@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -registry-auth-token@^3.0.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" - dependencies: - rc "^1.1.6" - safe-buffer "^5.0.1" - -registry-url@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - dependencies: - rc "^1.0.1" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - dependencies: - jsesc "~0.5.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - -replace-ext@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" - -replace-ext@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" - -request-promise-core@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" - dependencies: - lodash "^4.13.1" - -request-promise-native@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" - dependencies: - request-promise-core "1.1.1" - stealthy-require "^1.1.0" - tough-cookie ">=2.3.3" - -request@2.81.0: - version "2.81.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~4.2.1" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - qs "~6.4.0" - safe-buffer "^5.0.1" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "^0.6.0" - uuid "^3.0.0" - -request@^2.83.0: - version "2.83.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - hawk "~6.0.2" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - stringstream "~0.0.5" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - -require-from-string@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.1.tgz#c545233e9d7da6616e9d59adfb39fc9f588676ff" - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - -require-uncached@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - -requires-port@1.0.x, requires-port@1.x.x, requires-port@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - dependencies: - resolve-from "^3.0.0" - -resolve-dir@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - -resolve@^1.1.6: - version "1.6.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c" - dependencies: - path-parse "^1.0.5" - -resolve@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" - dependencies: - path-parse "^1.0.5" - -responselike@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - dependencies: - lowercase-keys "^1.0.0" - -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - dependencies: - glob "^7.0.5" - -rimraf@~2.2.6: - version "2.2.8" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" - dependencies: - hash-base "^2.0.0" - inherits "^2.0.1" - -run-async@^2.0.0, run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - dependencies: - is-promise "^2.1.0" - -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - dependencies: - aproba "^1.1.1" - -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - -rxjs@^5.4.2: - version "5.5.6" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.6.tgz#e31fb96d6fd2ff1fd84bcea8ae9c02d007179c02" - dependencies: - symbol-observable "1.0.1" - -rxjs@^5.5.2: - version "5.5.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.7.tgz#afb3d1642b069b2fbf203903d6501d1acb4cda27" - dependencies: - symbol-observable "1.0.1" - -safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - dependencies: - ret "~0.1.10" - -sane@^2.0.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/sane/-/sane-2.4.1.tgz#29f991208cf28636720efdc584293e7fd66663a5" - dependencies: - anymatch "^1.3.0" - exec-sh "^0.2.0" - fb-watchman "^2.0.0" - minimatch "^3.0.2" - minimist "^1.1.1" - walker "~1.0.5" - watch "~0.18.0" - optionalDependencies: - fsevents "^1.1.1" - -sax@^1.2.4, sax@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - -schema-utils@^0.4.2, schema-utils@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e" - dependencies: - ajv "^6.1.0" - ajv-keywords "^3.1.0" - -scoped-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8" - -select-hose@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" - -selfsigned@^1.9.1: - version "1.10.2" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.2.tgz#b4449580d99929b65b10a48389301a6592088758" - dependencies: - node-forge "0.7.1" - -semver-diff@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" - dependencies: - semver "^5.0.3" - -"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serialize-javascript@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.4.0.tgz#7c958514db6ac2443a8abc062dc9f7886a7f6005" - -serve-index@^1.7.2: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-getter@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" - dependencies: - to-object-path "^0.3.0" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - -setprototypeof@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.10" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.10.tgz#b1fde5cd7d11a5626638a07c604ab909cfa31f9b" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - -shelljs@^0.8.0: - version "0.8.1" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.1.tgz#729e038c413a2254c4078b95ed46e0397154a9f1" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -shellwords@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - -slice-ansi@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" - dependencies: - is-fullwidth-code-point "^2.0.0" - -slide@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.1.tgz#e12b5487faded3e3dea0ac91e9400bf75b401370" - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^2.0.0" - -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - -sntp@2.x.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" - dependencies: - hoek "4.x.x" - -sockjs-client@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.4.tgz#5babe386b775e4cf14e7520911452654016c8b12" - dependencies: - debug "^2.6.6" - eventsource "0.1.6" - faye-websocket "~0.11.0" - inherits "^2.0.1" - json3 "^3.3.2" - url-parse "^1.1.8" - -sockjs@0.3.19: - version "0.3.19" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" - dependencies: - faye-websocket "^0.10.0" - uuid "^3.0.1" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - dependencies: - is-plain-obj "^1.0.0" - -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - dependencies: - is-plain-obj "^1.0.0" - -source-list-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" - -source-map-resolve@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" - dependencies: - atob "^2.0.0" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.3.tgz#2b3d5fff298cfa4d1afd7d4352d569e9a0158e76" - dependencies: - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - -source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - -spawn-sync@^1.0.15: - version "1.0.15" - resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" - dependencies: - concat-stream "^1.4.7" - os-shim "^0.1.2" - -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" - dependencies: - spdx-license-ids "^1.0.2" - -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" - -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" - -spdy-transport@^2.0.18: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.1.0.tgz#4bbb15aaffed0beefdd56ad61dbdc8ba3e2cb7a1" - dependencies: - debug "^2.6.8" - detect-node "^2.0.3" - hpack.js "^2.1.6" - obuf "^1.1.1" - readable-stream "^2.2.9" - safe-buffer "^5.0.1" - wbuf "^1.7.2" - -spdy@^3.4.1: - version "3.4.7" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" - dependencies: - debug "^2.6.8" - handle-thing "^1.2.5" - http-deceiver "^1.2.7" - safe-buffer "^5.0.1" - select-hose "^2.0.0" - spdy-transport "^2.0.18" - -split-lines@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/split-lines/-/split-lines-1.1.0.tgz#3abba8f598614142f9db8d27ab6ab875662a1e09" - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - dependencies: - extend-shallow "^3.0.0" - -split2@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" - dependencies: - through2 "^2.0.2" - -split@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" - dependencies: - through "2" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -sshpk@^1.7.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - -ssri@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.2.4.tgz#9985e14041e65fc397af96542be35724ac11da52" - dependencies: - safe-buffer "^5.1.1" - -stack-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" - -staged-git-files@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" - -standard-version@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/standard-version/-/standard-version-4.3.0.tgz#41006cfee4eeab7c0ff3a47eecaa4c7506ed2e3f" - dependencies: - chalk "^1.1.3" - conventional-changelog "^1.1.0" - conventional-recommended-bump "^1.0.0" - dotgitignore "^1.0.3" - figures "^1.5.0" - fs-access "^1.0.0" - semver "^5.1.0" - yargs "^8.0.1" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.3.1 < 2", statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - -stealthy-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - -stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-each@^1.1.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd" - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-http@^2.7.2: - version "2.8.0" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.0.tgz#fd86546dac9b1c91aff8fc5d287b98fafb41bc10" - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.3" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - -stream-to-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10" - dependencies: - any-observable "^0.2.0" - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - -string-length@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" - dependencies: - astral-regex "^1.0.0" - strip-ansi "^4.0.0" - -string-template@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@^1.0.0, string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -stringify-object@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.2.tgz#9853052e5a88fb605a44cd27445aa257ad7ffbcd" - dependencies: - get-own-enumerable-property-symbols "^2.0.1" - is-obj "^1.0.1" - is-regexp "^1.0.0" - -stringstream@~0.0.4, stringstream@~0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" - -strip-bom-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz#f87db5ef2613f6968aa545abfe1ec728b6a829ca" - dependencies: - first-chunk-stream "^2.0.0" - strip-bom "^2.0.0" - -strip-bom@3.0.0, strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - dependencies: - is-utf8 "^0.2.0" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - dependencies: - get-stdin "^4.0.1" - -strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -suffix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/suffix/-/suffix-0.1.0.tgz#3e46966de56af17600385e58db8ec659dd797907" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -supports-color@^3.1.2, supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - -supports-color@^5.1.0, supports-color@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" - dependencies: - has-flag "^3.0.0" - -supports-color@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.2.0.tgz#b0d5333b1184dd3666cbe5aa0b45c5ac7ac17a4a" - dependencies: - has-flag "^3.0.0" - -svgo@^0.7.0: - version "0.7.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" - dependencies: - coa "~1.0.1" - colors "~1.1.2" - csso "~2.3.1" - js-yaml "~3.7.0" - mkdirp "~0.5.1" - sax "~1.2.1" - whet.extend "~0.9.9" - -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" - -symbol-observable@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" - -symbol-tree@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" - -table@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" - dependencies: - ajv "^5.2.3" - ajv-keywords "^2.1.0" - chalk "^2.1.0" - lodash "^4.17.4" - slice-ansi "1.0.0" - string-width "^2.1.1" - -tapable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" - -tar-pack@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" - dependencies: - debug "^2.2.0" - fstream "^1.0.10" - fstream-ignore "^1.0.5" - once "^1.3.3" - readable-stream "^2.1.4" - rimraf "^2.5.1" - tar "^2.2.1" - uid-number "^0.0.6" - -tar@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - -temp@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" - dependencies: - os-tmpdir "^1.0.0" - rimraf "~2.2.6" - -term-size@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - dependencies: - execa "^0.7.0" - -test-exclude@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.0.tgz#07e3613609a362c74516a717515e13322ab45b3c" - dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - -text-extensions@^1.0.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39" - -text-table@^0.2.0, text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - -textextensions@2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.2.0.tgz#38ac676151285b658654581987a0ce1a4490d286" - -throat@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" - -through2@^2.0.0, through2@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - dependencies: - readable-stream "^2.1.5" - xtend "~4.0.1" - -through@2, "through@>=2.2.7 <3", through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -thunky@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371" - -timed-out@^4.0.0, timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - -timers-browserify@^2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae" - dependencies: - setimmediate "^1.0.4" - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - dependencies: - os-tmpdir "~1.0.2" - -tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" - dependencies: - punycode "^1.4.1" - -tr46@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - dependencies: - punycode "^2.1.0" - -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - -trim-off-newlines@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - dependencies: - prelude-ls "~1.1.2" - -type-is@~1.6.15, type-is@~1.6.16: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" - dependencies: - media-typer "0.3.0" - mime-types "~2.1.18" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - -uglify-es@^3.3.4: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" - dependencies: - commander "~2.13.0" - source-map "~0.6.1" - -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -uglifyjs-webpack-plugin@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.4.tgz#5eec941b2e9b8538be0a20fc6eda25b14c7c1043" - dependencies: - cacache "^10.0.4" - find-cache-dir "^1.0.0" - schema-utils "^0.4.5" - serialize-javascript "^1.4.0" - source-map "^0.6.1" - uglify-es "^3.3.4" - webpack-sources "^1.1.0" - worker-farm "^1.5.2" - -uid-number@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - -underscore@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" - -union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - -uniqid@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" - dependencies: - macaddress "^0.2.8" - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - -unique-filename@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" - dependencies: - imurmurhash "^0.1.4" - -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - dependencies: - crypto-random-string "^1.0.0" - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -untildify@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/untildify/-/untildify-3.0.2.tgz#7f1f302055b3fea0f3e81dc78eb36766cb65e3f1" - -unzip-response@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" - -upath@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.4.tgz#ee2321ba0a786c50973db043a50b7bcba822361d" - -update-notifier@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.3.0.tgz#4e8827a6bb915140ab093559d7014e3ebb837451" - dependencies: - boxen "^1.2.1" - chalk "^2.0.1" - configstore "^3.0.0" - import-lazy "^2.1.0" - is-installed-globally "^0.1.0" - is-npm "^1.0.0" - latest-version "^3.0.0" - semver-diff "^2.0.0" - xdg-basedir "^3.0.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - -url-join@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a" - -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - dependencies: - prepend-http "^1.0.1" - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - dependencies: - prepend-http "^2.0.0" - -url-parse@1.0.x: - version "1.0.5" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" - dependencies: - querystringify "0.0.x" - requires-port "1.0.x" - -url-parse@^1.1.8: - version "1.2.0" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.2.0.tgz#3a19e8aaa6d023ddd27dcc44cb4fc8f7fec23986" - dependencies: - querystringify "~1.0.0" - requires-port "~1.0.0" - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -use@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/use/-/use-2.0.2.tgz#ae28a0d72f93bf22422a18a2e379993112dec8e8" - dependencies: - define-property "^0.2.5" - isobject "^3.0.0" - lazy-cache "^2.0.2" - -user-home@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -util.promisify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" - dependencies: - define-properties "^1.1.2" - object.getownpropertydescriptors "^2.0.3" - -util@0.10.3, util@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - -uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" - -v8-compile-cache@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-1.1.2.tgz#8d32e4f16974654657e676e0e467a348e89b0dc4" - -v8flags@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" - dependencies: - user-home "^1.1.1" - -validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" - dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - -vendors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vinyl-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-2.0.0.tgz#a7ebf5ffbefda1b7d18d140fcb07b223efb6751a" - dependencies: - graceful-fs "^4.1.2" - pify "^2.3.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - strip-bom-stream "^2.0.0" - vinyl "^1.1.0" - -vinyl@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" - dependencies: - clone "^1.0.0" - clone-stats "^0.0.1" - replace-ext "0.0.1" - -vinyl@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c" - dependencies: - clone "^2.1.1" - clone-buffer "^1.0.0" - clone-stats "^1.0.0" - cloneable-readable "^1.0.0" - remove-trailing-separator "^1.0.1" - replace-ext "^1.0.0" - -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - -w3c-hr-time@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" - dependencies: - browser-process-hrtime "^0.1.2" - -walker@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - dependencies: - makeerror "1.0.x" - -watch@~0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" - dependencies: - exec-sh "^0.2.0" - minimist "^1.2.0" - -watchpack@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.5.0.tgz#231e783af830a22f8966f65c4c4bacc814072eed" - dependencies: - chokidar "^2.0.2" - graceful-fs "^4.1.2" - neo-async "^2.5.0" - -wbuf@^1.1.0, wbuf@^1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" - dependencies: - minimalistic-assert "^1.0.0" - -webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - -webpack-addons@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/webpack-addons/-/webpack-addons-1.1.5.tgz#2b178dfe873fb6e75e40a819fa5c26e4a9bc837a" - dependencies: - jscodeshift "^0.4.0" - -webpack-cli@^2.0.13: - version "2.0.13" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-2.0.13.tgz#6e2bd9ef91345344737217e22e29001ad8537518" - dependencies: - chalk "^2.3.2" - cross-spawn "^6.0.5" - diff "^3.5.0" - enhanced-resolve "^4.0.0" - glob-all "^3.1.0" - global-modules "^1.0.0" - got "^8.2.0" - inquirer "^5.1.0" - interpret "^1.0.4" - jscodeshift "^0.5.0" - listr "^0.13.0" - loader-utils "^1.1.0" - lodash "^4.17.5" - log-symbols "^2.2.0" - mkdirp "^0.5.1" - p-each-series "^1.0.0" - p-lazy "^1.0.0" - prettier "^1.5.3" - resolve-cwd "^2.0.0" - supports-color "^5.3.0" - v8-compile-cache "^1.1.2" - webpack-addons "^1.1.5" - yargs "^11.0.0" - yeoman-environment "^2.0.0" - yeoman-generator "^2.0.3" - -webpack-defaults@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/webpack-defaults/-/webpack-defaults-1.6.0.tgz#0eb33b36860e3bafbf035f78ca06139f658b3dda" - dependencies: - chalk "^1.1.3" - mrm-core "^1.1.0" - -webpack-dev-middleware@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.0.1.tgz#7ffd6d0192883c83d3f262e8d7dec822493c6166" - dependencies: - loud-rejection "^1.6.0" - memory-fs "~0.4.1" - mime "^2.1.0" - path-is-absolute "^1.0.0" - range-parser "^1.0.3" - url-join "^4.0.0" - webpack-log "^1.0.1" - -webpack-dev-server@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.1.1.tgz#3c0fdd1ba3b50ebc79858a0e6b9ccdd1565b0c24" - dependencies: - ansi-html "0.0.7" - array-includes "^3.0.3" - bonjour "^3.5.0" - chokidar "^2.0.0" - compression "^1.5.2" - connect-history-api-fallback "^1.3.0" - debug "^3.1.0" - del "^3.0.0" - express "^4.16.2" - html-entities "^1.2.0" - http-proxy-middleware "~0.17.4" - import-local "^1.0.0" - internal-ip "1.2.0" - ip "^1.1.5" - killable "^1.0.0" - loglevel "^1.4.1" - opn "^5.1.0" - portfinder "^1.0.9" - selfsigned "^1.9.1" - serve-index "^1.7.2" - sockjs "0.3.19" - sockjs-client "1.1.4" - spdy "^3.4.1" - strip-ansi "^3.0.0" - supports-color "^5.1.0" - webpack-dev-middleware "3.0.1" - webpack-log "^1.1.2" - yargs "9.0.1" - -webpack-log@^1.0.1, webpack-log@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-1.1.2.tgz#cdc76016537eed24708dc6aa3d1e52189efee107" - dependencies: - chalk "^2.1.0" - log-symbols "^2.1.0" - loglevelnext "^1.0.1" - uuid "^3.1.0" - -webpack-merge@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.1.tgz#f1197a0a973e69c6fbeeb6d658219aa8c0c13555" - dependencies: - lodash "^4.17.4" - -webpack-sources@^1.0.1, webpack-sources@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.3.0.tgz#0b0c1e211311b3995dd25aed47ab46ea658be070" - dependencies: - acorn "^5.0.0" - acorn-dynamic-import "^3.0.0" - ajv "^6.1.0" - ajv-keywords "^3.1.0" - chrome-trace-event "^0.1.1" - enhanced-resolve "^4.0.0" - eslint-scope "^3.7.1" - loader-runner "^2.3.0" - loader-utils "^1.1.0" - memory-fs "~0.4.1" - micromatch "^3.1.8" - mkdirp "~0.5.0" - neo-async "^2.5.0" - node-libs-browser "^2.0.0" - schema-utils "^0.4.2" - tapable "^1.0.0" - uglifyjs-webpack-plugin "^1.2.4" - watchpack "^1.5.0" - webpack-sources "^1.0.1" - -websocket-driver@>=0.5.1: - version "0.7.0" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" - dependencies: - http-parser-js ">=0.4.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" - -whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3" - dependencies: - iconv-lite "0.4.19" - -whatwg-url@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08" - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.0" - webidl-conversions "^4.0.1" - -whet.extend@~0.9.9: - version "0.9.9" - resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - -which@1.2.x: - version "1.2.14" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" - dependencies: - isexe "^2.0.0" - -which@^1.2.10, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" - dependencies: - string-width "^1.0.2" - -widest-line@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" - dependencies: - string-width "^2.1.1" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - -worker-farm@^1.5.2: - version "1.5.4" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.4.tgz#4debbe46b40edefcc717ebde74a90b1ae1e909a1" - dependencies: - errno "~0.1.7" - xtend "~4.0.1" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -wreck@^12.5.1: - version "12.5.1" - resolved "https://registry.yarnpkg.com/wreck/-/wreck-12.5.1.tgz#cd2ffce167449e1f0242ed9cf80552e20fb6902a" - dependencies: - boom "5.x.x" - hoek "4.x.x" - -write-file-atomic@^1.2.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - slide "^1.1.5" - -write-file-atomic@^2.0.0, write-file-atomic@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - dependencies: - mkdirp "^0.5.1" - -ws@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-4.0.0.tgz#bfe1da4c08eeb9780b986e0e4d10eccd7345999f" - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -xdg-basedir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - -xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - -y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - -yargs-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" - dependencies: - camelcase "^4.1.0" - -yargs-parser@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" - dependencies: - camelcase "^4.1.0" - -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - dependencies: - camelcase "^4.1.0" - -yargs@9.0.1, yargs@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - -yargs@^10.0.3: - version "10.1.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^8.1.0" - -yargs@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" - -yargs@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - -yargs@~1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-1.2.6.tgz#9c7b4a82fd5d595b2bf17ab6dcc43135432fe34b" - dependencies: - minimist "^0.1.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - -yarn-install@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/yarn-install/-/yarn-install-0.2.1.tgz#43841c12d7099a481f89fbfa6ca49d3bf92d15e3" - dependencies: - cac "^3.0.3" - chalk "^1.1.3" - cross-spawn "^4.0.2" - -yeoman-environment@^2.0.0, yeoman-environment@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.0.5.tgz#84f22bafa84088971fe99ea85f654a3a3dd2b693" - dependencies: - chalk "^2.1.0" - debug "^3.1.0" - diff "^3.3.1" - escape-string-regexp "^1.0.2" - globby "^6.1.0" - grouped-queue "^0.3.3" - inquirer "^3.3.0" - is-scoped "^1.0.0" - lodash "^4.17.4" - log-symbols "^2.1.0" - mem-fs "^1.1.0" - text-table "^0.2.0" - untildify "^3.0.2" - -yeoman-generator@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/yeoman-generator/-/yeoman-generator-2.0.3.tgz#19426ed22687ffe05d31526c3f1c2cf67ba768f3" - dependencies: - async "^2.6.0" - chalk "^2.3.0" - cli-table "^0.3.1" - cross-spawn "^5.1.0" - dargs "^5.1.0" - dateformat "^3.0.2" - debug "^3.1.0" - detect-conflict "^1.0.0" - error "^7.0.2" - find-up "^2.1.0" - github-username "^4.0.0" - istextorbinary "^2.1.0" - lodash "^4.17.4" - make-dir "^1.1.0" - mem-fs-editor "^3.0.2" - minimist "^1.2.0" - pretty-bytes "^4.0.2" - read-chunk "^2.1.0" - read-pkg-up "^3.0.0" - rimraf "^2.6.2" - run-async "^2.0.0" - shelljs "^0.8.0" - text-table "^0.2.0" - through2 "^2.0.0" - yeoman-environment "^2.0.5"