Compare commits
153 Commits
Author | SHA1 | Date |
---|---|---|
|
8b415570d9 | |
|
f383db1af6 | |
|
1665353845 | |
|
75e747055f | |
|
c7ebdbda63 | |
|
b7530c2510 | |
|
f3ef1428b3 | |
|
d32f1711ac | |
|
436fc7d9da | |
|
c7dd066327 | |
|
85bacbdc6e | |
|
7634cd28bf | |
|
9f98d803c0 | |
|
8804459884 | |
|
bc91301142 | |
|
e1afcd4cc2 | |
|
d45073a2b3 | |
|
568bb1d789 | |
|
11144e4eec | |
|
b6c781a0f1 | |
|
3c08fd105c | |
|
f508e8b705 | |
|
5c11f27b6b | |
|
14c813a0b3 | |
|
761b153060 | |
|
8c0fa9e9dc | |
|
0a58530ef4 | |
|
042bf86cf8 | |
|
d9121b39a1 | |
|
3f00777e67 | |
|
3cf0d95e86 | |
|
84e5c129d1 | |
|
44cf16f2eb | |
|
a9c6c3d203 | |
|
45d47c608a | |
|
f6c3c24da3 | |
|
c647cf193c | |
|
73cecf5e78 | |
|
ae52500e95 | |
|
19f5693ebc | |
|
cf17a41259 | |
|
898c48042d | |
|
ab9f78b8f6 | |
|
a796d25769 | |
|
8e94386ee4 | |
|
3ac31e24e3 | |
|
7fc28f1e53 | |
|
6e6d0442ae | |
|
3799e931af | |
|
480bb3b91d | |
|
c90f405abd | |
|
4fabb754de | |
|
2a76ea2192 | |
|
ffcbedddd4 | |
|
36b322ad23 | |
|
1f5e8e55c7 | |
|
ce2f41e312 | |
|
16c6966b14 | |
|
6b70c4ac52 | |
|
06f4cb2a08 | |
|
a4c722ed95 | |
|
99c36fab8e | |
|
95ce962897 | |
|
930785fb00 | |
|
df204b5f71 | |
|
cc8e6a195a | |
|
c52d8b3b75 | |
|
e4ae6e83ce | |
|
e5fd6a18fe | |
|
6529f8c789 | |
|
407de36dfb | |
|
20abdce9b0 | |
|
c45737f0c4 | |
|
b865bf3468 | |
|
4888e41087 | |
|
57a8ebd761 | |
|
50119bb9b0 | |
|
d2d939cd7c | |
|
7ddc38a376 | |
|
deac8ba5e1 | |
|
2d25a95d8c | |
|
1ffd83f416 | |
|
a61dbf4a64 | |
|
62924911ad | |
|
df563e9b50 | |
|
21988d7ab4 | |
|
092b3fe533 | |
|
851abce98b | |
|
47e80b56a7 | |
|
47f9786b81 | |
|
6ae1330fb2 | |
|
740f0f629b | |
|
fd2f76d845 | |
|
76ce24f414 | |
|
8092e42124 | |
|
8ea693e6a0 | |
|
b843ea827b | |
|
6b313c950d | |
|
488ba2ef1d | |
|
79304704b5 | |
|
5b0f260913 | |
|
64ce283d76 | |
|
bb98bb1470 | |
|
d224b7b334 | |
|
076863133b | |
|
08599420db | |
|
914db1f7ca | |
|
a0f19f7c50 | |
|
e2ded49ee6 | |
|
e570c1b5d1 | |
|
c1803e4b37 | |
|
500b22c42d | |
|
d624db8491 | |
|
70cecf35dd | |
|
f5edf251a9 | |
|
13f6eab4f4 | |
|
64985ecad6 | |
|
ba552aabfc | |
|
82966a31a7 | |
|
bcde724fec | |
|
153afb3cf1 | |
|
31f983ec38 | |
|
160395c94b | |
|
4d670a28a9 | |
|
04398dd9b4 | |
|
71569824c3 | |
|
5b7dee29ff | |
|
a61ea77727 | |
|
6c26f74e88 | |
|
8c287addee | |
|
3f9a75fadf | |
|
feaa933996 | |
|
72b7d0c298 | |
|
3da52936e0 | |
|
7cdb4b92fe | |
|
07b1ac0213 | |
|
8d7efb8b04 | |
|
935cbd8552 | |
|
dc79e95022 | |
|
90ae8af3d1 | |
|
8db97f863f | |
|
c92deaf02c | |
|
c50930b3be | |
|
613a5ada7e | |
|
1d9cc240a2 | |
|
f0da8c6c2e | |
|
0d7aaae4ca | |
|
c21b4e2475 | |
|
0617b7d787 | |
|
cbfba9a150 | |
|
61a15a672e | |
|
ad23854a27 | |
|
1a3c3a33bf |
|
@ -21,5 +21,11 @@ trim_trailing_whitespace = false
|
|||
[test/cases/parsing/bom/bomfile.{css,js}]
|
||||
charset = utf-8-bom
|
||||
|
||||
[test/configCases/asset-modules/bytes/file.text]
|
||||
insert_final_newline = false
|
||||
|
||||
[test/configCases/asset-modules/bytes/file.svg]
|
||||
insert_final_newline = false
|
||||
|
||||
[test/configCases/css/no-extra-runtime-in-js/source.text]
|
||||
insert_final_newline = false
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
open_collective: webpack
|
|
@ -1,24 +0,0 @@
|
|||
<!-- Please don't delete this template or we'll close your issue -->
|
||||
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
|
||||
<!-- Also consider trying the webpack@beta version, maybe it's already fixed. -->
|
||||
|
||||
**Do you want to request a _feature_ or report a _bug_?**
|
||||
|
||||
<!-- Please ask questions on StackOverflow or the GitHub Discussions. -->
|
||||
<!-- https://github.com/webpack/webpack/discussions -->
|
||||
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
|
||||
<!-- Issues which contain questions or support requests will be closed. -->
|
||||
|
||||
**What is the current behavior?**
|
||||
|
||||
**If the current behavior is a bug, please provide the steps to reproduce.**
|
||||
|
||||
<!-- A great way to do this is to provide your configuration via a GitHub gist. -->
|
||||
<!-- Best provide a minimal reproducible repo -->
|
||||
<!-- If your issue is caused by a plugin or loader file the issue on the plugin/loader repo -->
|
||||
|
||||
**What is the expected behavior?**
|
||||
|
||||
**If this is a feature request, what is motivation or use case for changing the behavior?**
|
||||
|
||||
**Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.**
|
|
@ -1,36 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
---
|
||||
|
||||
<!-- Please don't delete this template because we'll close your issue -->
|
||||
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
|
||||
|
||||
# Bug report
|
||||
|
||||
<!-- Please ask questions on StackOverflow or the GitHub Discussions. -->
|
||||
<!-- https://github.com/webpack/webpack/discussions -->
|
||||
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
|
||||
<!-- Issues which contain questions or support requests will be closed. -->
|
||||
|
||||
**What is the current behavior?**
|
||||
|
||||
**If the current behavior is a bug, please provide the steps to reproduce.**
|
||||
|
||||
<!-- A great way to do this is to provide your configuration via a GitHub repository -->
|
||||
<!-- The most helpful is a minimal reproduction with instructions on how to reproduce -->
|
||||
<!-- Repositories with too many files or large `webpack.config.js` files are not suitable -->
|
||||
<!-- Please only add small code snippets directly into this issue -->
|
||||
<!-- https://gist.github.com is a good place for longer code snippets -->
|
||||
<!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead -->
|
||||
|
||||
**What is the expected behavior?**
|
||||
|
||||
<!-- "It should work" is not a helpful explanation -->
|
||||
<!-- Explain exactly how it should behave -->
|
||||
|
||||
**Other relevant information:**
|
||||
webpack version:
|
||||
Node.js version:
|
||||
Operating System:
|
||||
Additional tools:
|
|
@ -1,23 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
---
|
||||
|
||||
<!-- Please don't delete this template or we'll close your issue -->
|
||||
|
||||
## Feature request
|
||||
|
||||
<!-- Issues that contain questions or support requests will be closed. -->
|
||||
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
|
||||
<!-- Check if this feature needs to be implemented in a plugin or loader instead -->
|
||||
<!-- If yes: file the issue on the plugin/loader repo -->
|
||||
<!-- Features related to the development server should be filed on this repo instead -->
|
||||
|
||||
**What is the expected behavior?**
|
||||
|
||||
**What is motivation or use case for adding/changing the behavior?**
|
||||
|
||||
**How should this be implemented in your opinion?**
|
||||
|
||||
**Are you willing to work on this yourself?**
|
||||
yes
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
name: Other
|
||||
about: Something else
|
||||
---
|
||||
|
||||
<!-- Bug reports and Feature requests must use other templates, or will be closed -->
|
||||
<!-- Please ask questions on StackOverflow or the GitHub Discussions. -->
|
||||
<!-- https://github.com/webpack/webpack/discussions -->
|
||||
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
|
||||
<!-- Issues which contain questions or support requests will be closed. -->
|
|
@ -1,22 +0,0 @@
|
|||
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
|
||||
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
|
||||
<!-- Try to link to an open issue for more information. -->
|
||||
|
||||
<!-- In addition to that please answer these questions: -->
|
||||
|
||||
**What kind of change does this PR introduce?**
|
||||
|
||||
<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->
|
||||
|
||||
**Did you add tests for your changes?**
|
||||
|
||||
<!-- Note that we won't merge your changes if you don't add tests -->
|
||||
|
||||
**Does this PR introduce a breaking change?**
|
||||
|
||||
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->
|
||||
|
||||
**What needs to be documented once your changes are merged?**
|
||||
|
||||
<!-- List all the information that needs to be added to the documentation after merge -->
|
||||
<!-- When your changes are merged you will be asked to contribute this to the documentation -->
|
|
@ -1,6 +1,7 @@
|
|||
name: "Dependency Review"
|
||||
name: Dependency Review
|
||||
|
||||
on: [pull_request]
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -9,12 +10,21 @@ jobs:
|
|||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Repository"
|
||||
uses: actions/checkout@v5
|
||||
- name: "Dependency Review"
|
||||
uses: actions/dependency-review-action@v4
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Dependency Review
|
||||
uses: actions/dependency-review-action@56339e523c0409420f6c2c9a2f4292bbb3c07dd3 # v4.8.0
|
||||
with:
|
||||
allow-dependencies-licenses: "pkg:npm/@cspell/dict-en-common-misspellings, pkg:npm/flatted, pkg:npm/parse-imports, pkg:npm/prettier, pkg:npm/type-fest, pkg:npm/abbrev, pkg:npm/@pkgjs/parseargs, pkg:npm/cookie-signature"
|
||||
allow-dependencies-licenses: |
|
||||
pkg:npm/@cspell/dict-en-common-misspellings,
|
||||
pkg:npm/flatted,
|
||||
pkg:npm/parse-imports,
|
||||
pkg:npm/prettier,
|
||||
pkg:npm/type-fest,
|
||||
pkg:npm/abbrev,
|
||||
pkg:npm/@pkgjs/parseargs,
|
||||
pkg:npm/cookie-signature
|
||||
allow-licenses: |
|
||||
0BSD,
|
||||
AFL-1.1,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name: "Update examples"
|
||||
name: Update examples
|
||||
|
||||
on:
|
||||
schedule:
|
||||
|
@ -12,21 +12,28 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: "yarn"
|
||||
cache: yarn
|
||||
|
||||
- run: yarn --frozen-lockfile
|
||||
|
||||
- run: yarn link --frozen-lockfile || true
|
||||
|
||||
- run: yarn link webpack --frozen-lockfile
|
||||
|
||||
- run: yarn build:examples
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||
with:
|
||||
token: ${{ secrets.PAT }}
|
||||
delete-branch: true
|
||||
|
|
|
@ -2,11 +2,9 @@ name: Github Actions
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
|
@ -16,49 +14,61 @@ jobs:
|
|||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: "yarn"
|
||||
cache: yarn
|
||||
|
||||
- run: yarn --frozen-lockfile
|
||||
|
||||
- name: Cache prettier result
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: ./node_modules/.cache/prettier/.prettier-cache
|
||||
key: lint-prettier-${{ runner.os }}-node-${{ hashFiles('**/yarn.lock', '**/.prettierrc.js') }}
|
||||
restore-keys: lint-prettier-
|
||||
|
||||
- name: Cache eslint result
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: .eslintcache
|
||||
key: lint-eslint-${{ runner.os }}-node-${{ hashFiles('**/yarn.lock', '**/eslint.config.mjs') }}
|
||||
restore-keys: lint-eslint-
|
||||
|
||||
- name: Cache cspell result
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: .cspellcache
|
||||
key: lint-cspell-${{ runner.os }}-node-${{ hashFiles('**/yarn.lock', '**/cspell.json') }}
|
||||
restore-keys: lint-cspell-
|
||||
|
||||
- run: yarn lint
|
||||
|
||||
- name: Validate types using old typescript version
|
||||
run: |
|
||||
yarn upgrade typescript@5.0 @types/node@20
|
||||
yarn --frozen-lockfile
|
||||
yarn validate:types
|
||||
|
||||
validate-legacy-node:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Use Node.js 10.x
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: 10.x
|
||||
cache: "yarn"
|
||||
cache: yarn
|
||||
|
||||
# Remove `devDependencies` from `package.json` to avoid `yarn install` compatibility error
|
||||
- run: node -e "const content = require('./package.json');delete content.devDependencies;require('fs').writeFileSync('package.json', JSON.stringify(content, null, 2));"
|
||||
|
||||
- run: yarn install --production --frozen-lockfile
|
||||
|
||||
benchmark:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -69,63 +79,86 @@ jobs:
|
|||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-tags: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: "yarn"
|
||||
cache: yarn
|
||||
|
||||
- run: yarn --frozen-lockfile
|
||||
|
||||
- run: yarn link --frozen-lockfile || true
|
||||
|
||||
- run: yarn link webpack --frozen-lockfile
|
||||
|
||||
- name: Run benchmarks
|
||||
uses: CodSpeedHQ/action@v3
|
||||
uses: CodSpeedHQ/action@6b43a0cd438f6ca5ad26f9ed03ed159ed2df7da9 # v4.1.1
|
||||
with:
|
||||
run: yarn benchmark --ci
|
||||
mode: "instrumentation"
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
env:
|
||||
LAST_COMMIT: 1
|
||||
NEGATIVE_FILTER: on-schedule
|
||||
SHARD: ${{ matrix.shard }}
|
||||
|
||||
basic:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: "yarn"
|
||||
cache: yarn
|
||||
|
||||
- run: yarn --frozen-lockfile
|
||||
|
||||
- run: yarn link --frozen-lockfile || true
|
||||
|
||||
- run: yarn link webpack --frozen-lockfile
|
||||
|
||||
- run: yarn test:basic --ci
|
||||
|
||||
unit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: "yarn"
|
||||
cache: yarn
|
||||
|
||||
- run: yarn --frozen-lockfile
|
||||
|
||||
- run: yarn link --frozen-lockfile || true
|
||||
|
||||
- run: yarn link webpack --frozen-lockfile
|
||||
- uses: actions/cache@v4
|
||||
|
||||
- name: Cache jest result
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: .jest-cache
|
||||
key: jest-unit-${{ env.GITHUB_SHA }}
|
||||
restore-keys: jest-unit-${{ hashFiles('**/yarn.lock', '**/jest.config.js') }}
|
||||
|
||||
- run: yarn cover:unit --ci --cacheDirectory .jest-cache
|
||||
- uses: codecov/codecov-action@v5
|
||||
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
|
||||
with:
|
||||
flags: unit
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
integration:
|
||||
needs: basic
|
||||
strategy:
|
||||
|
@ -159,8 +192,9 @@ jobs:
|
|||
part: a
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
id: calculate_architecture
|
||||
with:
|
||||
result-encoding: string
|
||||
|
@ -170,41 +204,55 @@ jobs:
|
|||
} else {
|
||||
return ''
|
||||
}
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
architecture: ${{ steps.calculate_architecture.outputs.result }}
|
||||
cache: "yarn"
|
||||
cache: yarn
|
||||
|
||||
# Install old `jest` version and deps for legacy node versions
|
||||
- run: |
|
||||
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 husky@^8.0.3 lint-staged@^13.2.1 cspell@^6.31.1 open-cli@^7.2.0 coffee-loader@^1.0.0 babel-loader@^8.1.0 style-loader@^2.0.0 css-loader@^5.0.1 less-loader@^8.1.1 mini-css-extract-plugin@^1.6.1 nyc@^15.1.0 --ignore-engines
|
||||
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 husky@^8.0.3 lint-staged@^13.2.1 cspell@^6.31.1 open-cli@^7.2.0 coffee-loader@^1.0.0 babel-loader@^8.1.0 style-loader@^2.0.0 css-loader@^5.0.1 less-loader@^8.1.1 mini-css-extract-plugin@^1.6.1 nyc@^15.1.0 memfs@4.14.0 --ignore-engines
|
||||
yarn --frozen-lockfile --ignore-engines
|
||||
if: matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x'
|
||||
|
||||
- run: |
|
||||
yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0 @types/jest@^27.4.0 pretty-format@^27.0.2 husky@^8.0.3 lint-staged@^13.2.1 nyc@^15.1.0 coffee-loader@1.0.0 babel-loader@^8.1.0 style-loader@^2.0.0 css-loader@^5.0.1 less-loader@^8.1.1 mini-css-extract-plugin@^1.6.1 --ignore-engines
|
||||
yarn --frozen-lockfile
|
||||
if: matrix.node-version == '16.x'
|
||||
|
||||
- run: |
|
||||
yarn upgrade cspell@^8.8.4 lint-staged@^15.2.5 --ignore-engines
|
||||
yarn --frozen-lockfile
|
||||
if: matrix.node-version == '18.x'
|
||||
|
||||
# Install main version of our deps
|
||||
- run: yarn upgrade enhanced-resolve@webpack/enhanced-resolve#main loader-runner@webpack/loader-runner#main webpack-sources@webpack/webpack-sources#main watchpack@webpack/watchpack#main tapable@webpack/tapable#main
|
||||
if: matrix.use_main_branches == '1'
|
||||
|
||||
# Install dependencies for LTS node versions
|
||||
- run: yarn --frozen-lockfile
|
||||
if: matrix.node-version != '10.x' && matrix.node-version != '12.x' && matrix.node-version != '14.x' && matrix.node-version != '16.x'
|
||||
|
||||
- run: yarn link --frozen-lockfile || true
|
||||
|
||||
- run: yarn link webpack --frozen-lockfile
|
||||
- uses: actions/cache@v4
|
||||
|
||||
- name: Cache jest result
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: .jest-cache
|
||||
key: jest-integration-${{ env.GITHUB_SHA }}
|
||||
restore-keys: jest-integration-${{ hashFiles('**/yarn.lock', '**/jest.config.js') }}
|
||||
|
||||
- run: yarn cover:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache || yarn cover:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache -f
|
||||
|
||||
- run: yarn cover:merge
|
||||
- uses: codecov/codecov-action@v5
|
||||
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
|
||||
with:
|
||||
flags: integration
|
||||
env:
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
[Code of Conduct](https://github.com/openjs-foundation/code-and-learn/blob/master/CODE_OF_CONDUCT.md)
|
47
README.md
|
@ -20,6 +20,7 @@
|
|||
[](https://github.com/webpack/webpack/graphs/contributors)
|
||||
[](https://github.com/webpack/webpack/discussions)
|
||||
[](https://discord.gg/5sxFZPdx2k)
|
||||
[](https://insights.linuxfoundation.org/project/webpack)
|
||||
|
||||
<h1>webpack</h1>
|
||||
<p>
|
||||
|
@ -45,7 +46,7 @@
|
|||
- [Backers](#backers)
|
||||
- [Special Thanks](#special-thanks-to)
|
||||
|
||||
<h2>Install</h2>
|
||||
## Install
|
||||
|
||||
Install with npm:
|
||||
|
||||
|
@ -59,7 +60,7 @@ Install with yarn:
|
|||
yarn add webpack --dev
|
||||
```
|
||||
|
||||
<h2>Introduction</h2>
|
||||
## Introduction
|
||||
|
||||
Webpack is a bundler for modules. The main purpose is to bundle JavaScript
|
||||
files for usage in a browser, yet it is also capable of transforming, bundling,
|
||||
|
@ -87,7 +88,7 @@ Check out webpack's quick [**Get Started**](https://webpack.js.org/guides/gettin
|
|||
Webpack supports all browsers that are [ES5-compliant](https://kangax.github.io/compat-table/es5/) (IE8 and below are not supported).
|
||||
Webpack also needs `Promise` for `import()` and `require.ensure()`. If you want to support older browsers, you will need to [load a polyfill](https://webpack.js.org/guides/shimming/) before using these expressions.
|
||||
|
||||
<h2>Concepts</h2>
|
||||
## Concepts
|
||||
|
||||
### [Plugins](https://webpack.js.org/plugins/)
|
||||
|
||||
|
@ -264,7 +265,7 @@ If you're working on webpack itself, or building advanced plugins or integration
|
|||
|
||||
[tapable-tracer-npm]: https://img.shields.io/npm/v/tapable-tracer.svg
|
||||
|
||||
<h2>Contributing</h2>
|
||||
## Contributing
|
||||
|
||||
**We want contributing to webpack to be fun, enjoyable, and educational for anyone, and everyone.** We have a [vibrant ecosystem](https://medium.com/webpack/contributors-guide/home) that spans beyond this single repo. We welcome you to check out any of the repositories in [our organization](https://github.com/webpack) or [webpack-contrib organization](https://github.com/webpack-contrib) which houses all of our loaders and plugins.
|
||||
|
||||
|
@ -283,11 +284,11 @@ Contributions go far beyond pull requests and commits. Although we love giving y
|
|||
|
||||
To get started have a look at our [documentation on contributing](https://github.com/webpack/webpack/blob/main/CONTRIBUTING.md).
|
||||
|
||||
<h3>Creating your own plugins and loaders</h3>
|
||||
### Creating your own plugins and loaders
|
||||
|
||||
If you create a loader or plugin, we would <3 for you to open source it, and put it on npm. We follow the `x-loader`, `x-webpack-plugin` naming convention.
|
||||
|
||||
<h2>Support</h2>
|
||||
## Support
|
||||
|
||||
We consider webpack to be a low-level tool used not only individually but also layered beneath other awesome tools. Because of its flexibility, webpack isn't always the _easiest_ entry-level solution, however we do believe it is the most powerful. That said, we're always looking for ways to improve and simplify the tool without compromising functionality. If you have any ideas on ways to accomplish this, we're all ears!
|
||||
|
||||
|
@ -295,11 +296,11 @@ If you're just getting started, take a look at [our new docs and concepts page](
|
|||
|
||||
If you have discovered a 🐜 or have a feature suggestion, feel free to create an issue on GitHub.
|
||||
|
||||
<h2>Current project members</h2>
|
||||
## Current project members
|
||||
|
||||
For information about the governance of the Node.js project, see [GOVERNANCE.md](./GOVERNANCE.md).
|
||||
For information about the governance of the webpack project, see [GOVERNANCE.md](./GOVERNANCE.md).
|
||||
|
||||
<h3>TSC (Technical Steering Committee)</h3>
|
||||
### TSC (Technical Steering Committee)
|
||||
|
||||
- [alexander-akait](https://github.com/alexander-akait) -
|
||||
**Alexander Akait** <<sheo13666q@gmail.com>> (he/him)
|
||||
|
@ -312,18 +313,11 @@ For information about the governance of the Node.js project, see [GOVERNANCE.md]
|
|||
- [thelarkinn](https://github.com/thelarkinn) -
|
||||
**Sean Larkin** <<selarkin@microsoft.com>> (he/him)
|
||||
|
||||
<h3>Core Collaborators</h3>
|
||||
### Maintenance
|
||||
|
||||
- [jhnns](https://github.com/jhnns) -
|
||||
**Johannes Ewald** <<mail@johannesewald.de>>
|
||||
- [sokra](https://github.com/sokra) -
|
||||
**Tobias Koppers** <<jackworks@protonmail.co>>
|
||||
- [spacek33z](https://github.com/spacek33z) -
|
||||
**Kees Kluskens** <<kees@webduck.nl>>
|
||||
- [TheLarkInn](https://github.com/TheLarkInn) -
|
||||
**Sean T. Larkin** <<selarkin@microsoft.com>>
|
||||
This webpack repository is maintained by the [`Core Working Group`](./WORKING_GROUP.md).
|
||||
|
||||
<h2>Sponsoring</h2>
|
||||
## Sponsoring
|
||||
|
||||
Most of the core team members, webpack contributors and contributors in the ecosystem do this open source work in their free time. If you use webpack for a serious task, and you'd like us to invest more time on it, please donate. This project increases your income/productivity too. It makes development and applications faster and it reduces the required bandwidth.
|
||||
|
||||
|
@ -336,7 +330,7 @@ This is how we use the donations:
|
|||
- Infrastructure cost
|
||||
- Fees for money handling
|
||||
|
||||
<h3>Premium Partners</h3>
|
||||
### Premium Partners
|
||||
|
||||
<div align="center">
|
||||
|
||||
|
@ -345,7 +339,7 @@ This is how we use the donations:
|
|||
|
||||
</div>
|
||||
|
||||
<h3>Other Backers and Sponsors</h3>
|
||||
### Other Backers and Sponsors
|
||||
|
||||
Before we started using OpenCollective, donations were made anonymously. Now that we have made the switch, we would like to acknowledge these sponsors (and the ones who continue to donate using OpenCollective). If we've missed someone, please send us a PR, and we'll add you to this list.
|
||||
|
||||
|
@ -357,7 +351,7 @@ Before we started using OpenCollective, donations were made anonymously. Now tha
|
|||
|
||||
</div>
|
||||
|
||||
<h3>Gold Sponsors</h3>
|
||||
### Gold Sponsors
|
||||
|
||||
[Become a gold sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on GitHub with a link to your site.
|
||||
|
||||
|
@ -396,7 +390,7 @@ Before we started using OpenCollective, donations were made anonymously. Now tha
|
|||
|
||||
</div>
|
||||
|
||||
<h3>Silver Sponsors</h3>
|
||||
### Silver Sponsors
|
||||
|
||||
[Become a silver sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on GitHub with a link to your site.
|
||||
|
||||
|
@ -435,7 +429,7 @@ Before we started using OpenCollective, donations were made anonymously. Now tha
|
|||
|
||||
</div>
|
||||
|
||||
<h3>Bronze Sponsors</h3>
|
||||
### Bronze Sponsors
|
||||
|
||||
[Become a bronze sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on GitHub with a link to your site.
|
||||
|
||||
|
@ -545,7 +539,7 @@ Before we started using OpenCollective, donations were made anonymously. Now tha
|
|||
|
||||
</div>
|
||||
|
||||
<h3>Backers</h3>
|
||||
### Backers
|
||||
|
||||
[Become a backer](https://opencollective.com/webpack#backer) and get your image on our README on GitHub with a link to your site.
|
||||
|
||||
|
@ -651,7 +645,8 @@ Before we started using OpenCollective, donations were made anonymously. Now tha
|
|||
<a href="https://opencollective.com/webpack/backer/99/website?requireActive=false" target="_blank"><img width="30" src="https://opencollective.com/webpack/backer/99/avatar.svg?requireActive=false"></a>
|
||||
<a href="https://opencollective.com/webpack/backer/100/website?requireActive=false" target="_blank"><img width="30" src="https://opencollective.com/webpack/backer/100/avatar.svg?requireActive=false"></a>
|
||||
|
||||
<h2>Special Thanks to</h2>
|
||||
## Special Thanks to
|
||||
|
||||
<p>(In chronological order)</p>
|
||||
|
||||
- [@google](https://github.com/google) for [Google Web Toolkit (GWT)](http://www.gwtproject.org/), which aims to compile Java to JavaScript. It features a similar [Code Splitting](http://www.gwtproject.org/doc/latest/DevGuideCodeSplitting.html) as webpack.
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# Reporting Security Issues
|
||||
|
||||
If you discover a security issue in webpack, please report it by sending an
|
||||
email to [webpack@opencollective.com](mailto:webpack@opencollective.com).
|
||||
|
||||
This will allow us to assess the risk, and make a fix available before we add a
|
||||
bug report to the GitHub repository.
|
||||
|
||||
Thanks for helping make webpack safe for everyone.
|
|
@ -0,0 +1,48 @@
|
|||
# Webpack Core Working Group
|
||||
|
||||
This document outlines the webpack core working group.
|
||||
|
||||
---
|
||||
|
||||
## Working Group Name
|
||||
|
||||
Webpack Core Working Group
|
||||
|
||||
## Purpose and Responsibilities
|
||||
|
||||
The purpose of this working group is to facilitate, implement and fix problems and features within the core of webpack. This core includes tasking such as bugfixes, feature implementation and in general maintaining the main logic of webpack.
|
||||
|
||||
Each member of the working group is required to adhere to the [governance model of webpack](https://github.com/webpack/governance). In addition to having responsibility of the main part of webpack, the working group will manage other parts of the webpack organization repositories in such way they see fit.
|
||||
|
||||
## Goals & Objectives
|
||||
|
||||
- Develop features within the webpack organization and core areas.
|
||||
- Fix bugs within webpack organization and core areas.
|
||||
- Maintain and steer webpack in general together with the Technical Steering Committee.
|
||||
- Ensure performance and code coverage is sustained and top-notch.
|
||||
|
||||
## Members
|
||||
|
||||
- [snitin315](https://github.com/snitin315) -
|
||||
**Nitin Kumar** <<snitin315@gmail.com>> (he/him)
|
||||
- [thelarkinn](https://github.com/thelarkinn) -
|
||||
**Sean Larkin** <<selarkin@microsoft.com>> (he/him)
|
||||
- [jhnns](https://github.com/jhnns) -
|
||||
**Johannes Ewald** <<mail@johannesewald.de>>
|
||||
- [sokra](https://github.com/sokra) -
|
||||
**Tobias Koppers** <<jackworks@protonmail.co>>
|
||||
- [spacek33z](https://github.com/spacek33z) -
|
||||
**Kees Kluskens** <<kees@webduck.nl>>
|
||||
|
||||
## Communication
|
||||
|
||||
Meetings are hosted on an as-needed basis and private discussions are held in the #core-wg channel. For public feedback and communication, please use an appropriate channel within the webpack discord (e.g `#development-general`).
|
||||
|
||||
## Resources
|
||||
|
||||
- https://github.com/webpack
|
||||
- https://github.com/webpack/governance
|
||||
|
||||
## Reporting & Updates
|
||||
|
||||
- The working group can choose to involve the webpack TSC for feedback and updates, but has full autonomy of making changes to any codebase within webpack.
|
|
@ -284,6 +284,7 @@
|
|||
"url's",
|
||||
"valign",
|
||||
"valtype",
|
||||
"walltime",
|
||||
"wasi",
|
||||
"wasm",
|
||||
"watchings",
|
||||
|
@ -304,10 +305,6 @@
|
|||
"commithash",
|
||||
"formaters",
|
||||
"akait",
|
||||
"Akait",
|
||||
"ematipico",
|
||||
"Emanuele",
|
||||
"Stoppa",
|
||||
"evenstensberg",
|
||||
"Stensberg",
|
||||
"ovflowd",
|
||||
|
@ -316,7 +313,9 @@
|
|||
"Nitin",
|
||||
"Kumar",
|
||||
"spacek",
|
||||
"thelarkinn"
|
||||
"thelarkinn",
|
||||
"behaviour",
|
||||
"WHATWG"
|
||||
],
|
||||
"ignoreRegExpList": [
|
||||
"/Author.+/",
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
type TODO = any;
|
||||
type EXPECTED_ANY = any;
|
||||
type EXPECTED_FUNCTION = Function;
|
||||
type EXPECTED_OBJECT = object;
|
||||
|
@ -55,7 +54,7 @@ declare module "neo-async" {
|
|||
(err?: E, result?: T): void;
|
||||
}
|
||||
export interface AsyncResultArrayCallback<T, E> {
|
||||
(err?: E, results?: Array<T | undefined>): void;
|
||||
(err: E | null, results?: Array<T | undefined>): void;
|
||||
}
|
||||
export interface AsyncResultObjectCallback<T, E> {
|
||||
(err: E | undefined, results: Dictionary<T | undefined>): void;
|
||||
|
@ -371,6 +370,12 @@ declare module "watchpack" {
|
|||
}
|
||||
|
||||
declare module "eslint-scope/lib/referencer" {
|
||||
class Referencer {}
|
||||
type Property = import("estree").Property;
|
||||
type PropertyDefinition = import("estree").PropertyDefinition;
|
||||
|
||||
class Referencer {
|
||||
Property(node: PropertyDefinition | Property): void;
|
||||
PropertyDefinition(node: PropertyDefinition): void;
|
||||
}
|
||||
export = Referencer;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,9 @@ import type Hash from "../lib/util/Hash";
|
|||
import type { InputFileSystem } from "../lib/util/fs";
|
||||
import type { Logger } from "../lib/logging/Logger";
|
||||
import type {
|
||||
ImportModuleOptions,
|
||||
ImportModuleCallback,
|
||||
ImportModuleOptions
|
||||
ExecuteModuleExports
|
||||
} from "../lib/dependencies/LoaderPlugin";
|
||||
import type { Resolver } from "enhanced-resolve";
|
||||
import type {
|
||||
|
@ -33,7 +34,7 @@ export interface NormalModuleLoaderContext<OptionsType> {
|
|||
emitWarning(warning: Error): void;
|
||||
emitError(error: Error): void;
|
||||
getLogger(name?: string): Logger;
|
||||
resolve(context: string, request: string, callback: ResolveCallback): any;
|
||||
resolve(context: string, request: string, callback: ResolveCallback): void;
|
||||
getResolve(
|
||||
options?: ResolveOptionsWithDependencyType
|
||||
): ((context: string, request: string, callback: ResolveCallback) => void) &
|
||||
|
@ -58,7 +59,7 @@ export interface NormalModuleLoaderContext<OptionsType> {
|
|||
hashFunction: HashFunction;
|
||||
hashDigest: HashDigest;
|
||||
hashDigestLength: HashDigestLength;
|
||||
hashSalt: HashSalt;
|
||||
hashSalt?: HashSalt;
|
||||
_module?: NormalModule;
|
||||
_compilation?: Compilation;
|
||||
_compiler?: Compiler;
|
||||
|
@ -92,7 +93,10 @@ export interface LoaderPluginLoaderContext {
|
|||
options: ImportModuleOptions | undefined,
|
||||
callback: ImportModuleCallback
|
||||
): void;
|
||||
importModule(request: string, options?: ImportModuleOptions): Promise<any>;
|
||||
importModule(
|
||||
request: string,
|
||||
options?: ImportModuleOptions
|
||||
): Promise<ExecuteModuleExports>;
|
||||
}
|
||||
|
||||
/** The properties are added by https://github.com/webpack/loader-runner */
|
||||
|
|
|
@ -47,6 +47,10 @@ export type DevServer =
|
|||
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
|
||||
*/
|
||||
export type DevTool = (false | "eval") | string;
|
||||
/**
|
||||
* Enable and configure the Dotenv plugin to load environment variables from .env files.
|
||||
*/
|
||||
export type Dotenv = boolean | DotenvPluginOptions;
|
||||
/**
|
||||
* The entry point(s) of the compilation.
|
||||
*/
|
||||
|
@ -82,10 +86,7 @@ export type EntryFilename = FilenameTemplate;
|
|||
*/
|
||||
export type FilenameTemplate =
|
||||
| string
|
||||
| ((
|
||||
pathData: import("../lib/Compilation").PathData,
|
||||
assetInfo?: import("../lib/Compilation").AssetInfo
|
||||
) => string);
|
||||
| import("../lib/TemplatedPathPlugin").TemplatePathFn;
|
||||
/**
|
||||
* Specifies the layer in which modules of this entrypoint are placed.
|
||||
*/
|
||||
|
@ -144,10 +145,7 @@ export type PublicPath = "auto" | RawPublicPath;
|
|||
*/
|
||||
export type RawPublicPath =
|
||||
| string
|
||||
| ((
|
||||
pathData: import("../lib/Compilation").PathData,
|
||||
assetInfo?: import("../lib/Compilation").AssetInfo
|
||||
) => string);
|
||||
| import("../lib/TemplatedPathPlugin").TemplatePathFn;
|
||||
/**
|
||||
* The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
|
||||
*/
|
||||
|
@ -197,16 +195,13 @@ export type ExternalItemFunction =
|
|||
/**
|
||||
* The function is called on each dependency (`function(context, request, callback(err, result))`).
|
||||
*/
|
||||
export type ExternalItemFunctionCallback = (
|
||||
data: ExternalItemFunctionData,
|
||||
callback: (err?: Error | null, result?: ExternalItemValue) => void
|
||||
) => void;
|
||||
export type ExternalItemFunctionCallback =
|
||||
import("../lib/ExternalModuleFactoryPlugin").ExternalItemFunctionCallback;
|
||||
/**
|
||||
* The function is called on each dependency (`function(context, request)`).
|
||||
*/
|
||||
export type ExternalItemFunctionPromise = (
|
||||
data: ExternalItemFunctionData
|
||||
) => Promise<ExternalItemValue>;
|
||||
export type ExternalItemFunctionPromise =
|
||||
import("../lib/ExternalModuleFactoryPlugin").ExternalItemFunctionPromise;
|
||||
/**
|
||||
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
|
||||
*/
|
||||
|
@ -466,10 +461,7 @@ export type OptimizationSplitChunksSizes =
|
|||
*/
|
||||
export type AssetModuleFilename =
|
||||
| string
|
||||
| ((
|
||||
pathData: import("../lib/Compilation").PathData,
|
||||
assetInfo?: import("../lib/Compilation").AssetInfo
|
||||
) => string);
|
||||
| import("../lib/TemplatedPathPlugin").TemplatePathFn;
|
||||
/**
|
||||
* Add charset attribute for script tag.
|
||||
*/
|
||||
|
@ -517,7 +509,7 @@ export type CssFilename = FilenameTemplate;
|
|||
*/
|
||||
export type DevtoolFallbackModuleFilenameTemplate =
|
||||
| string
|
||||
| ((context: TODO) => string);
|
||||
| import("../lib/ModuleFilenameHelpers").ModuleFilenameTemplateFunction;
|
||||
/**
|
||||
* Filename template string of function for the sources array in a generated SourceMap.
|
||||
*/
|
||||
|
@ -549,9 +541,21 @@ export type Filename = FilenameTemplate;
|
|||
*/
|
||||
export type GlobalObject = string;
|
||||
/**
|
||||
* Digest type used for the hash.
|
||||
* Digest types used for the hash.
|
||||
*/
|
||||
export type HashDigest = string;
|
||||
export type HashDigest =
|
||||
| "base64"
|
||||
| "base64url"
|
||||
| "hex"
|
||||
| "binary"
|
||||
| "utf8"
|
||||
| "utf-8"
|
||||
| "utf16le"
|
||||
| "utf-16le"
|
||||
| "latin1"
|
||||
| "ascii"
|
||||
| "ucs2"
|
||||
| "ucs-2";
|
||||
/**
|
||||
* Number of chars which are used for the hash.
|
||||
*/
|
||||
|
@ -729,10 +733,7 @@ export type WarningFilterTypes =
|
|||
export type WarningFilterItemTypes =
|
||||
| RegExp
|
||||
| string
|
||||
| ((
|
||||
warning: import("../lib/stats/DefaultStatsFactoryPlugin").StatsError,
|
||||
value: string
|
||||
) => boolean);
|
||||
| import("../lib/stats/DefaultStatsPresetPlugin").WarningFilterFn;
|
||||
/**
|
||||
* Environment to build for. An array of environments to build for all of them when possible.
|
||||
*/
|
||||
|
@ -764,10 +765,7 @@ export type AssetGeneratorOptions = AssetInlineGeneratorOptions &
|
|||
*/
|
||||
export type AssetModuleOutputPath =
|
||||
| string
|
||||
| ((
|
||||
pathData: import("../lib/Compilation").PathData,
|
||||
assetInfo?: import("../lib/Compilation").AssetInfo
|
||||
) => string);
|
||||
| import("../lib/TemplatedPathPlugin").TemplatePathFn;
|
||||
/**
|
||||
* Function that executes for module and should return whenever asset should be inlined as DataUrl.
|
||||
*/
|
||||
|
@ -822,33 +820,6 @@ export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
|
|||
*/
|
||||
export type ExperimentsNormalized = ExperimentsCommon &
|
||||
ExperimentsNormalizedExtra;
|
||||
/**
|
||||
* Get a resolve function with the current resolver options.
|
||||
*/
|
||||
export type ExternalItemFunctionDataGetResolve = (
|
||||
options?: ResolveOptions
|
||||
) =>
|
||||
| ExternalItemFunctionDataGetResolveCallbackResult
|
||||
| ExternalItemFunctionDataGetResolveResult;
|
||||
/**
|
||||
* Result of get a resolve function with the current resolver options.
|
||||
*/
|
||||
export type ExternalItemFunctionDataGetResolveCallbackResult = (
|
||||
context: string,
|
||||
request: string,
|
||||
callback: (
|
||||
err?: Error | null,
|
||||
result?: string | false,
|
||||
resolveRequest?: import("enhanced-resolve").ResolveRequest
|
||||
) => void
|
||||
) => void;
|
||||
/**
|
||||
* Callback result of get a resolve function with the current resolver options.
|
||||
*/
|
||||
export type ExternalItemFunctionDataGetResolveResult = (
|
||||
context: string,
|
||||
request: string
|
||||
) => Promise<string>;
|
||||
/**
|
||||
* The dependency used for the external.
|
||||
*/
|
||||
|
@ -889,6 +860,13 @@ export type OptimizationRuntimeChunkNormalized =
|
|||
*/
|
||||
name?: import("../lib/optimize/RuntimeChunkPlugin").RuntimeChunkFunction;
|
||||
};
|
||||
/**
|
||||
* Add additional plugins to the compiler.
|
||||
*/
|
||||
export type PluginsNormalized = (
|
||||
| WebpackPluginInstance
|
||||
| WebpackPluginFunction
|
||||
)[];
|
||||
|
||||
/**
|
||||
* Options object as provided by the user.
|
||||
|
@ -922,6 +900,10 @@ export interface WebpackOptions {
|
|||
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
|
||||
*/
|
||||
devtool?: DevTool;
|
||||
/**
|
||||
* Enable and configure the Dotenv plugin to load environment variables from .env files.
|
||||
*/
|
||||
dotenv?: Dotenv;
|
||||
/**
|
||||
* The entry point(s) of the compilation.
|
||||
*/
|
||||
|
@ -1146,6 +1128,23 @@ export interface FileCacheOptions {
|
|||
*/
|
||||
version?: string;
|
||||
}
|
||||
/**
|
||||
* Options for Dotenv plugin.
|
||||
*/
|
||||
export interface DotenvPluginOptions {
|
||||
/**
|
||||
* The directory from which .env files are loaded. Can be an absolute path, or a path relative to the project root. false will disable the .env file loading.
|
||||
*/
|
||||
dir?: boolean | string;
|
||||
/**
|
||||
* Only expose environment variables that start with these prefixes. Defaults to 'WEBPACK_'.
|
||||
*/
|
||||
prefix?: string[] | string;
|
||||
/**
|
||||
* Template patterns for .env file names. Use [mode] as placeholder for the webpack mode. Defaults to ['.env', '.env.local', '.env.[mode]', '.env.[mode].local'].
|
||||
*/
|
||||
template?: string[];
|
||||
}
|
||||
/**
|
||||
* Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.
|
||||
*/
|
||||
|
@ -1460,6 +1459,10 @@ export interface RuleSetRule {
|
|||
* Shortcut for resource.exclude.
|
||||
*/
|
||||
exclude?: RuleSetConditionOrConditionsAbsolute;
|
||||
/**
|
||||
* Enable/Disable extracting source map.
|
||||
*/
|
||||
extractSourceMap?: boolean;
|
||||
/**
|
||||
* The options for the module generator.
|
||||
*/
|
||||
|
@ -1890,7 +1893,7 @@ export interface OptimizationSplitChunksOptions {
|
|||
chunks?:
|
||||
| ("initial" | "async" | "all")
|
||||
| RegExp
|
||||
| ((chunk: import("../lib/Chunk")) => boolean);
|
||||
| import("../lib/optimize/SplitChunksPlugin").ChunkFilterFn;
|
||||
/**
|
||||
* Sets the size types which are used when a number is used for sizes.
|
||||
*/
|
||||
|
@ -1913,7 +1916,7 @@ export interface OptimizationSplitChunksOptions {
|
|||
chunks?:
|
||||
| ("initial" | "async" | "all")
|
||||
| RegExp
|
||||
| ((chunk: import("../lib/Chunk")) => boolean);
|
||||
| import("../lib/optimize/SplitChunksPlugin").ChunkFilterFn;
|
||||
/**
|
||||
* Maximal size hint for the on-demand chunks.
|
||||
*/
|
||||
|
@ -1938,12 +1941,7 @@ export interface OptimizationSplitChunksOptions {
|
|||
/**
|
||||
* Sets the template for the filename for created chunks.
|
||||
*/
|
||||
filename?:
|
||||
| string
|
||||
| ((
|
||||
pathData: import("../lib/Compilation").PathData,
|
||||
assetInfo?: import("../lib/Compilation").AssetInfo
|
||||
) => string);
|
||||
filename?: string | import("../lib/TemplatedPathPlugin").TemplatePathFn;
|
||||
/**
|
||||
* Prevents exposing path info when creating names for parts splitted by maxSize.
|
||||
*/
|
||||
|
@ -1987,14 +1985,7 @@ export interface OptimizationSplitChunksOptions {
|
|||
/**
|
||||
* Give chunks created a name (chunks with equal name are merged).
|
||||
*/
|
||||
name?:
|
||||
| false
|
||||
| string
|
||||
| ((
|
||||
module: import("../lib/Module"),
|
||||
chunks: import("../lib/Chunk")[],
|
||||
key: string
|
||||
) => string | undefined);
|
||||
name?: false | string | import("../lib/optimize/SplitChunksPlugin").GetNameFn;
|
||||
/**
|
||||
* Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
|
||||
*/
|
||||
|
@ -2014,7 +2005,7 @@ export interface OptimizationSplitChunksCacheGroup {
|
|||
chunks?:
|
||||
| ("initial" | "async" | "all")
|
||||
| RegExp
|
||||
| ((chunk: import("../lib/Chunk")) => boolean);
|
||||
| import("../lib/optimize/SplitChunksPlugin").ChunkFilterFn;
|
||||
/**
|
||||
* Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.
|
||||
*/
|
||||
|
@ -2026,12 +2017,7 @@ export interface OptimizationSplitChunksCacheGroup {
|
|||
/**
|
||||
* Sets the template for the filename for created chunks.
|
||||
*/
|
||||
filename?:
|
||||
| string
|
||||
| ((
|
||||
pathData: import("../lib/Compilation").PathData,
|
||||
assetInfo?: import("../lib/Compilation").AssetInfo
|
||||
) => string);
|
||||
filename?: string | import("../lib/TemplatedPathPlugin").TemplatePathFn;
|
||||
/**
|
||||
* Sets the hint for chunk id.
|
||||
*/
|
||||
|
@ -2079,14 +2065,7 @@ export interface OptimizationSplitChunksCacheGroup {
|
|||
/**
|
||||
* Give chunks for this cache group a name (chunks with equal name are merged).
|
||||
*/
|
||||
name?:
|
||||
| false
|
||||
| string
|
||||
| ((
|
||||
module: import("../lib/Module"),
|
||||
chunks: import("../lib/Chunk")[],
|
||||
key: string
|
||||
) => string | undefined);
|
||||
name?: false | string | import("../lib/optimize/SplitChunksPlugin").GetNameFn;
|
||||
/**
|
||||
* Priority of this cache group.
|
||||
*/
|
||||
|
@ -2215,7 +2194,7 @@ export interface Output {
|
|||
*/
|
||||
globalObject?: GlobalObject;
|
||||
/**
|
||||
* Digest type used for the hash.
|
||||
* Digest types used for the hash.
|
||||
*/
|
||||
hashDigest?: HashDigest;
|
||||
/**
|
||||
|
@ -2350,7 +2329,7 @@ export interface CleanOptions {
|
|||
/**
|
||||
* Keep these assets.
|
||||
*/
|
||||
keep?: RegExp | string | ((filename: string) => boolean);
|
||||
keep?: RegExp | string | import("../lib/CleanPlugin").KeepFn;
|
||||
}
|
||||
/**
|
||||
* The abilities of the environment where the webpack generated code should run.
|
||||
|
@ -2468,6 +2447,19 @@ export interface SnapshotOptions {
|
|||
*/
|
||||
timestamp?: boolean;
|
||||
};
|
||||
/**
|
||||
* Options for snapshotting the context module to determine if it needs to be built again.
|
||||
*/
|
||||
contextModule?: {
|
||||
/**
|
||||
* Use hashes of the content of the files/directories to determine invalidation.
|
||||
*/
|
||||
hash?: boolean;
|
||||
/**
|
||||
* Use timestamps of the files/directories to determine invalidation.
|
||||
*/
|
||||
timestamp?: boolean;
|
||||
};
|
||||
/**
|
||||
* List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
|
||||
*/
|
||||
|
@ -2559,7 +2551,7 @@ export interface StatsOptions {
|
|||
/**
|
||||
* Add children information.
|
||||
*/
|
||||
children?: boolean;
|
||||
children?: StatsValue[] | StatsValue;
|
||||
/**
|
||||
* Display auxiliary assets in chunk groups.
|
||||
*/
|
||||
|
@ -3192,10 +3184,6 @@ export interface ExperimentsCommon {
|
|||
* Apply defaults of next major version.
|
||||
*/
|
||||
futureDefaults?: boolean;
|
||||
/**
|
||||
* Enable module layers.
|
||||
*/
|
||||
layers?: boolean;
|
||||
/**
|
||||
* Allow output javascript files as module source type.
|
||||
*/
|
||||
|
@ -3204,35 +3192,6 @@ export interface ExperimentsCommon {
|
|||
* Support WebAssembly as synchronous EcmaScript Module (outdated).
|
||||
*/
|
||||
syncWebAssembly?: boolean;
|
||||
/**
|
||||
* Allow using top-level-await in EcmaScript Modules.
|
||||
*/
|
||||
topLevelAwait?: boolean;
|
||||
}
|
||||
/**
|
||||
* Data object passed as argument when a function is set for 'externals'.
|
||||
*/
|
||||
export interface ExternalItemFunctionData {
|
||||
/**
|
||||
* The directory in which the request is placed.
|
||||
*/
|
||||
context?: string;
|
||||
/**
|
||||
* Contextual information.
|
||||
*/
|
||||
contextInfo?: import("../lib/ModuleFactory").ModuleFactoryCreateDataContextInfo;
|
||||
/**
|
||||
* The category of the referencing dependencies.
|
||||
*/
|
||||
dependencyType?: string;
|
||||
/**
|
||||
* Get a resolve function with the current resolver options.
|
||||
*/
|
||||
getResolve?: ExternalItemFunctionDataGetResolve;
|
||||
/**
|
||||
* The request as written by the user in the require/import expression/statement.
|
||||
*/
|
||||
request?: string;
|
||||
}
|
||||
/**
|
||||
* Options for building http resources.
|
||||
|
@ -3427,7 +3386,6 @@ export interface JavascriptParserOptions {
|
|||
* Set the inner regular expression for partial dynamic dependencies.
|
||||
*/
|
||||
wrappedContextRegExp?: RegExp;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Generator options for json modules.
|
||||
|
@ -3449,9 +3407,7 @@ export interface JsonParserOptions {
|
|||
/**
|
||||
* Function to parser content and return JSON.
|
||||
*/
|
||||
parse?: (
|
||||
input: string
|
||||
) => Buffer | import("../lib/json/JsonParser").JsonValue;
|
||||
parse?: import("../lib/json/JsonParser").ParseFn;
|
||||
}
|
||||
/**
|
||||
* Options for the default backend.
|
||||
|
@ -3467,7 +3423,7 @@ export interface LazyCompilationDefaultBackendOptions {
|
|||
listen?:
|
||||
| number
|
||||
| import("net").ListenOptions
|
||||
| ((server: import("net").Server) => void);
|
||||
| import("../lib/hmr/lazyCompilationBackend").Listen;
|
||||
/**
|
||||
* Specifies the protocol the client should use to connect to the server.
|
||||
*/
|
||||
|
@ -3480,7 +3436,7 @@ export interface LazyCompilationDefaultBackendOptions {
|
|||
| import("../lib/hmr/lazyCompilationBackend").HttpsServerOptions
|
||||
| import("../lib/hmr/lazyCompilationBackend").HttpServerOptions
|
||||
)
|
||||
| (() => import("../lib/hmr/lazyCompilationBackend").Server);
|
||||
| import("../lib/hmr/lazyCompilationBackend").CreateServerFunction;
|
||||
}
|
||||
/**
|
||||
* Options for compiling entrypoints and import()s only when they are accessed.
|
||||
|
@ -3490,18 +3446,7 @@ export interface LazyCompilationOptions {
|
|||
* Specifies the backend that should be used for handling client keep alive.
|
||||
*/
|
||||
backend?:
|
||||
| (
|
||||
| ((
|
||||
compiler: import("../lib/Compiler"),
|
||||
callback: (
|
||||
err: Error | null,
|
||||
api?: import("../lib/hmr/LazyCompilationPlugin").BackendApi
|
||||
) => void
|
||||
) => void)
|
||||
| ((
|
||||
compiler: import("../lib/Compiler")
|
||||
) => Promise<import("../lib/hmr/LazyCompilationPlugin").BackendApi>)
|
||||
)
|
||||
| import("../lib/hmr/LazyCompilationPlugin").BackEnd
|
||||
| LazyCompilationDefaultBackendOptions;
|
||||
/**
|
||||
* Enable/disable lazy compilation for entries.
|
||||
|
@ -3514,7 +3459,7 @@ export interface LazyCompilationOptions {
|
|||
/**
|
||||
* Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.
|
||||
*/
|
||||
test?: RegExp | string | ((module: import("../lib/Module")) => boolean);
|
||||
test?: RegExp | string | import("../lib/hmr/LazyCompilationPlugin").TestFn;
|
||||
}
|
||||
/**
|
||||
* Options affecting the normal modules (`NormalModuleFactory`).
|
||||
|
@ -3602,7 +3547,7 @@ export interface OptimizationNormalized {
|
|||
/**
|
||||
* Minimizer(s) to use for minimizing the output.
|
||||
*/
|
||||
minimizer?: ("..." | Falsy | WebpackPluginInstance | WebpackPluginFunction)[];
|
||||
minimizer?: ("..." | WebpackPluginInstance | WebpackPluginFunction)[];
|
||||
/**
|
||||
* Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).
|
||||
*/
|
||||
|
@ -3745,7 +3690,7 @@ export interface OutputNormalized {
|
|||
*/
|
||||
globalObject?: GlobalObject;
|
||||
/**
|
||||
* Digest type used for the hash.
|
||||
* Digest types used for the hash.
|
||||
*/
|
||||
hashDigest?: HashDigest;
|
||||
/**
|
||||
|
@ -3889,6 +3834,10 @@ export interface WebpackOptionsNormalized {
|
|||
* A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
|
||||
*/
|
||||
devtool?: DevTool;
|
||||
/**
|
||||
* Enable and configure the Dotenv plugin to load environment variables from .env files.
|
||||
*/
|
||||
dotenv?: Dotenv;
|
||||
/**
|
||||
* The entry point(s) of the compilation.
|
||||
*/
|
||||
|
@ -3956,7 +3905,7 @@ export interface WebpackOptionsNormalized {
|
|||
/**
|
||||
* Add additional plugins to the compiler.
|
||||
*/
|
||||
plugins: Plugins;
|
||||
plugins: PluginsNormalized;
|
||||
/**
|
||||
* Capture timing information for each module.
|
||||
*/
|
||||
|
@ -4018,6 +3967,7 @@ export interface ExperimentsExtra {
|
|||
* Compile entrypoints and import()s only when they are accessed.
|
||||
*/
|
||||
lazyCompilation?: boolean | LazyCompilationOptions;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Enables/Disables experiments (experimental features with relax SemVer compatibility).
|
||||
|
@ -4067,6 +4017,10 @@ export interface GeneratorOptionsByModuleTypeKnown {
|
|||
* Generator options for asset modules.
|
||||
*/
|
||||
asset?: AssetGeneratorOptions;
|
||||
/**
|
||||
* No generator options are supported for this module type.
|
||||
*/
|
||||
"asset/bytes"?: EmptyGeneratorOptions;
|
||||
/**
|
||||
* Generator options for asset/inline modules.
|
||||
*/
|
||||
|
@ -4075,6 +4029,10 @@ export interface GeneratorOptionsByModuleTypeKnown {
|
|||
* Generator options for asset/resource modules.
|
||||
*/
|
||||
"asset/resource"?: AssetResourceGeneratorOptions;
|
||||
/**
|
||||
* No generator options are supported for this module type.
|
||||
*/
|
||||
"asset/source"?: EmptyGeneratorOptions;
|
||||
/**
|
||||
* Generator options for css modules.
|
||||
*/
|
||||
|
@ -4131,6 +4089,10 @@ export interface ParserOptionsByModuleTypeKnown {
|
|||
* Parser options for asset modules.
|
||||
*/
|
||||
asset?: AssetParserOptions;
|
||||
/**
|
||||
* No parser options are supported for this module type.
|
||||
*/
|
||||
"asset/bytes"?: EmptyParserOptions;
|
||||
/**
|
||||
* No parser options are supported for this module type.
|
||||
*/
|
||||
|
|
|
@ -23,7 +23,7 @@ export type Rules = Rule[] | Rule;
|
|||
/**
|
||||
* Filtering rule as regex or string.
|
||||
*/
|
||||
export type Rule = RegExp | string;
|
||||
export type Rule = RegExp | string | ((str: string) => boolean);
|
||||
|
||||
export interface BannerPluginOptions {
|
||||
/**
|
||||
|
|
|
@ -19,5 +19,5 @@ export type IgnorePluginOptions =
|
|||
/**
|
||||
* A filter function for resource and context.
|
||||
*/
|
||||
checkResource: (resource: string, context: string) => boolean;
|
||||
checkResource: import("../../lib/IgnorePlugin").CheckResourceFn;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* This file was automatically generated.
|
||||
* DO NOT MODIFY BY HAND.
|
||||
* Run `yarn fix:special` to update
|
||||
*/
|
||||
|
||||
/**
|
||||
* A function that receives the manifest object and returns the manifest string.
|
||||
*/
|
||||
export type HandlerFunction = (manifest: ManifestObject) => string;
|
||||
/**
|
||||
* Maps asset identifiers to their manifest entries.
|
||||
*/
|
||||
export type ManifestObject = Record<string, ManifestItem>;
|
||||
|
||||
export interface ManifestPluginOptions {
|
||||
/**
|
||||
* Specifies the filename of the output file on disk. By default the plugin will emit `manifest.json` inside the 'output.path' directory.
|
||||
*/
|
||||
filename?: string;
|
||||
/**
|
||||
* A function that receives the manifest object and returns the manifest string.
|
||||
*/
|
||||
handler?: HandlerFunction;
|
||||
}
|
||||
/**
|
||||
* Describes a manifest entry that links the emitted path to the producing asset.
|
||||
*/
|
||||
export interface ManifestItem {
|
||||
/**
|
||||
* The compilation asset that produced this manifest entry.
|
||||
*/
|
||||
asset?: import("../../lib/Compilation").Asset;
|
||||
/**
|
||||
* The public path recorded in the manifest for this asset.
|
||||
*/
|
||||
filePath: string;
|
||||
}
|
|
@ -8,11 +8,7 @@ export type ProgressPluginArgument = ProgressPluginOptions | HandlerFunction;
|
|||
/**
|
||||
* Function that executes for every progress step.
|
||||
*/
|
||||
export type HandlerFunction = (
|
||||
percentage: number,
|
||||
msg: string,
|
||||
...args: string[]
|
||||
) => void;
|
||||
export type HandlerFunction = import("../../lib/ProgressPlugin").HandlerFn;
|
||||
|
||||
/**
|
||||
* Options object for the ProgressPlugin.
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Include source maps for modules based on their extension (defaults to .js and .css).
|
||||
* One or multiple conditions used to match resource.
|
||||
*/
|
||||
export type Rules = Rule[] | Rule;
|
||||
/**
|
||||
* Include source maps for modules based on their extension (defaults to .js and .css).
|
||||
* Condition used to match resource (string, RegExp or Function).
|
||||
*/
|
||||
export type Rule = RegExp | string;
|
||||
export type Rule = RegExp | string | ((str: string) => boolean);
|
||||
|
||||
export interface SourceMapDevToolPluginOptions {
|
||||
/**
|
||||
|
@ -20,10 +20,7 @@ export interface SourceMapDevToolPluginOptions {
|
|||
append?:
|
||||
| (false | null)
|
||||
| string
|
||||
| ((
|
||||
pathData: import("../../lib/Compilation").PathData,
|
||||
assetInfo?: import("../../lib/Compilation").AssetInfo
|
||||
) => string);
|
||||
| import("../../lib/TemplatedPathPlugin").TemplatePathFn;
|
||||
/**
|
||||
* Indicates whether column mappings should be used (defaults to true).
|
||||
*/
|
||||
|
@ -50,6 +47,10 @@ export interface SourceMapDevToolPluginOptions {
|
|||
* Defines the output filename of the SourceMap (will be inlined if no value is provided).
|
||||
*/
|
||||
filename?: (false | null) | string;
|
||||
/**
|
||||
* Decide whether to ignore source files that match the specified value in the SourceMap.
|
||||
*/
|
||||
ignoreList?: Rules;
|
||||
/**
|
||||
* Include source maps for module paths that match the given value.
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/**
|
||||
* Algorithm used for generation the hash (see node.js crypto package).
|
||||
*/
|
||||
export type HashFunction = string | typeof import("../../lib/util/Hash");
|
||||
export type HashFunction = string | typeof import("../../../lib/util/Hash");
|
||||
|
||||
export interface HashedModuleIdsPluginOptions {
|
||||
/**
|
||||
|
@ -17,7 +17,19 @@ export interface HashedModuleIdsPluginOptions {
|
|||
/**
|
||||
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
||||
*/
|
||||
hashDigest?: "hex" | "latin1" | "base64";
|
||||
hashDigest?:
|
||||
| "base64"
|
||||
| "base64url"
|
||||
| "hex"
|
||||
| "binary"
|
||||
| "utf8"
|
||||
| "utf-8"
|
||||
| "utf16le"
|
||||
| "utf-16le"
|
||||
| "latin1"
|
||||
| "ascii"
|
||||
| "ucs2"
|
||||
| "ucs-2";
|
||||
/**
|
||||
* The prefix length of the hash digest to use, defaults to 4.
|
||||
*/
|
|
@ -10,9 +10,7 @@ export type VirtualUrlPluginOptions = VirtualUrlOptions;
|
|||
*/
|
||||
export type VirtualModuleContent =
|
||||
| string
|
||||
| ((
|
||||
loaderContext: import("webpack").LoaderContext<EXPECTED_ANY>
|
||||
) => Promise<string> | string)
|
||||
| import("../../../lib/schemes/VirtualUrlPlugin").SourceFn
|
||||
| VirtualModule;
|
||||
|
||||
/**
|
||||
|
@ -37,9 +35,7 @@ export interface VirtualModule {
|
|||
/**
|
||||
* The source function that provides the virtual content.
|
||||
*/
|
||||
source: (
|
||||
loaderContext: import("webpack").LoaderContext<EXPECTED_ANY>
|
||||
) => Promise<string> | string;
|
||||
source: import("../../../lib/schemes/VirtualUrlPlugin").SourceFn;
|
||||
/**
|
||||
* The module type.
|
||||
*/
|
||||
|
@ -47,5 +43,8 @@ export interface VirtualModule {
|
|||
/**
|
||||
* Optional version function or value for cache invalidation.
|
||||
*/
|
||||
version?: true | string | (() => string | undefined);
|
||||
version?:
|
||||
| true
|
||||
| string
|
||||
| import("../../../lib/schemes/VirtualUrlPlugin").VersionFn;
|
||||
}
|
||||
|
|
|
@ -62,9 +62,9 @@ module.exports = {
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset pageA.bundle.js 8.85 KiB [emitted] (name: pageA)
|
||||
asset pageB.bundle.js 8.85 KiB [emitted] (name: pageB)
|
||||
asset pageC.bundle.js 8.85 KiB [emitted] (name: pageC)
|
||||
asset pageA.bundle.js 8.81 KiB [emitted] (name: pageA)
|
||||
asset pageB.bundle.js 8.81 KiB [emitted] (name: pageB)
|
||||
asset pageC.bundle.js 8.81 KiB [emitted] (name: pageC)
|
||||
asset 531.chunk.js 6.28 KiB [emitted]
|
||||
asset 78.chunk.js 605 bytes [emitted]
|
||||
chunk (runtime: pageC) 78.chunk.js 42 bytes [rendered]
|
||||
|
@ -79,15 +79,15 @@ chunk (runtime: pageC) 78.chunk.js 42 bytes [rendered]
|
|||
cjs self exports reference ./b.js 1:0-14
|
||||
cjs require ./b ./pageB.js 2:8-22
|
||||
cjs require ./b ./pageC.js 2:17-31
|
||||
chunk (runtime: pageB) pageB.bundle.js (pageB) 69 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageB) pageB.bundle.js (pageB) 69 bytes (javascript) 4.91 KiB (runtime) [entry] [rendered]
|
||||
> ./pageB pageB
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.91 KiB 6 modules
|
||||
./pageB.js 69 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./pageB pageB
|
||||
chunk (runtime: pageA) pageA.bundle.js (pageA) 69 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageA) pageA.bundle.js (pageA) 69 bytes (javascript) 4.91 KiB (runtime) [entry] [rendered]
|
||||
> ./pageA pageA
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.91 KiB 6 modules
|
||||
./pageA.js 69 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./pageA pageA
|
||||
|
@ -109,9 +109,9 @@ chunk (runtime: pageA, pageB) 531.chunk.js 5.45 KiB [rendered]
|
|||
cjs self exports reference ./common.js 1:0-14
|
||||
amd require ./common ./pageA.js 1:0-3:2
|
||||
amd require ./common ./pageB.js 1:0-3:2
|
||||
chunk (runtime: pageC) pageC.bundle.js (pageC) 68 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageC) pageC.bundle.js (pageC) 68 bytes (javascript) 4.91 KiB (runtime) [entry] [rendered]
|
||||
> ./pageC pageC
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.91 KiB 6 modules
|
||||
./pageC.js 68 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./pageC pageC
|
||||
|
@ -121,9 +121,9 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset pageC.bundle.js 1.73 KiB [emitted] [minimized] (name: pageC)
|
||||
asset pageA.bundle.js 1.71 KiB [emitted] [minimized] (name: pageA)
|
||||
asset pageB.bundle.js 1.71 KiB [emitted] [minimized] (name: pageB)
|
||||
asset pageC.bundle.js 1.71 KiB [emitted] [minimized] (name: pageC)
|
||||
asset pageA.bundle.js 1.7 KiB [emitted] [minimized] (name: pageA)
|
||||
asset pageB.bundle.js 1.7 KiB [emitted] [minimized] (name: pageB)
|
||||
asset 531.chunk.js 154 bytes [emitted] [minimized]
|
||||
asset 78.chunk.js 103 bytes [emitted] [minimized]
|
||||
chunk (runtime: pageC) 78.chunk.js 42 bytes [rendered]
|
||||
|
@ -138,15 +138,15 @@ chunk (runtime: pageC) 78.chunk.js 42 bytes [rendered]
|
|||
cjs self exports reference ./b.js 1:0-14
|
||||
cjs require ./b ./pageB.js 2:8-22
|
||||
cjs require ./b ./pageC.js 2:17-31
|
||||
chunk (runtime: pageB) pageB.bundle.js (pageB) 69 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageB) pageB.bundle.js (pageB) 69 bytes (javascript) 4.91 KiB (runtime) [entry] [rendered]
|
||||
> ./pageB pageB
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.91 KiB 6 modules
|
||||
./pageB.js 69 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./pageB pageB
|
||||
chunk (runtime: pageA) pageA.bundle.js (pageA) 69 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageA) pageA.bundle.js (pageA) 69 bytes (javascript) 4.91 KiB (runtime) [entry] [rendered]
|
||||
> ./pageA pageA
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.91 KiB 6 modules
|
||||
./pageA.js 69 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./pageA pageA
|
||||
|
@ -168,9 +168,9 @@ chunk (runtime: pageA, pageB) 531.chunk.js 5.45 KiB [rendered]
|
|||
cjs self exports reference ./common.js 1:0-14
|
||||
amd require ./common ./pageA.js 1:0-3:2
|
||||
amd require ./common ./pageB.js 1:0-3:2
|
||||
chunk (runtime: pageC) pageC.bundle.js (pageC) 68 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageC) pageC.bundle.js (pageC) 68 bytes (javascript) 4.91 KiB (runtime) [entry] [rendered]
|
||||
> ./pageC pageC
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.91 KiB 6 modules
|
||||
./pageC.js 68 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./pageC pageC
|
||||
|
|
|
@ -1,223 +0,0 @@
|
|||
This is a very simple example that shows the usage of the asset module type.
|
||||
|
||||
Files can be imported like other modules without file-loader.
|
||||
|
||||
# example.js
|
||||
|
||||
```javascript
|
||||
import png from "./images/file.png";
|
||||
import jpg from "./images/file.jpg";
|
||||
import svg from "./images/file.svg";
|
||||
|
||||
const container = document.createElement("div");
|
||||
Object.assign(container.style, {
|
||||
display: "flex",
|
||||
justifyContent: "center"
|
||||
});
|
||||
document.body.appendChild(container);
|
||||
|
||||
function createImageElement(title, src) {
|
||||
const div = document.createElement("div");
|
||||
div.style.textAlign = "center";
|
||||
|
||||
const h2 = document.createElement("h2");
|
||||
h2.textContent = title;
|
||||
div.appendChild(h2);
|
||||
|
||||
const img = document.createElement("img");
|
||||
img.setAttribute("src", src);
|
||||
img.setAttribute("width", "150");
|
||||
div.appendChild(img);
|
||||
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
[png, jpg, svg].forEach(src => {
|
||||
createImageElement(src.split(".").pop(), src);
|
||||
});
|
||||
```
|
||||
|
||||
# webpack.config.js
|
||||
|
||||
```javascript
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
assetModuleFilename: "images/[hash][ext]"
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(png|jpg|svg)$/,
|
||||
type: "asset"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
# js/output.js
|
||||
|
||||
```javascript
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */,
|
||||
/* 1 */
|
||||
/*!*************************!*\
|
||||
!*** ./images/file.png ***!
|
||||
\*************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: __webpack_require__.p, module, __webpack_require__.* */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = __webpack_require__.p + "images/89a353e9c515885abd8e.png";
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/*!*************************!*\
|
||||
!*** ./images/file.jpg ***!
|
||||
\*************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: module */
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAA...4CD/9M//Z";
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/*!*************************!*\
|
||||
!*** ./images/file.svg ***!
|
||||
\*************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: module */
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDo...vc3ZnPgo=";
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
```
|
||||
|
||||
<details><summary><code>/* webpack runtime code */</code></summary>
|
||||
|
||||
``` js
|
||||
/************************************************************************/
|
||||
/******/ // 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 });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/publicPath */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.p = "dist/";
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
``` js
|
||||
var __webpack_exports__ = {};
|
||||
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
||||
(() => {
|
||||
/*!********************!*\
|
||||
!*** ./example.js ***!
|
||||
\********************/
|
||||
/*! namespace exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.* */
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _images_file_png__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./images/file.png */ 1);
|
||||
/* harmony import */ var _images_file_jpg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./images/file.jpg */ 2);
|
||||
/* harmony import */ var _images_file_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./images/file.svg */ 3);
|
||||
|
||||
|
||||
|
||||
|
||||
const container = document.createElement("div");
|
||||
Object.assign(container.style, {
|
||||
display: "flex",
|
||||
justifyContent: "center"
|
||||
});
|
||||
document.body.appendChild(container);
|
||||
|
||||
function createImageElement(title, src) {
|
||||
const div = document.createElement("div");
|
||||
div.style.textAlign = "center";
|
||||
|
||||
const h2 = document.createElement("h2");
|
||||
h2.textContent = title;
|
||||
div.appendChild(h2);
|
||||
|
||||
const img = document.createElement("img");
|
||||
img.setAttribute("src", src);
|
||||
img.setAttribute("width", "150");
|
||||
div.appendChild(img);
|
||||
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
[_images_file_png__WEBPACK_IMPORTED_MODULE_0__, _images_file_jpg__WEBPACK_IMPORTED_MODULE_1__, _images_file_svg__WEBPACK_IMPORTED_MODULE_2__].forEach(src => {
|
||||
createImageElement(src.split(".").pop(), src);
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
```
|
||||
|
||||
# Info
|
||||
|
||||
## webpack output
|
||||
|
||||
```
|
||||
asset images/89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: images/file.png] (auxiliary name: main)
|
||||
asset output.js 13 KiB [emitted] (name: main)
|
||||
chunk (runtime: main) output.js (main) 9.58 KiB (javascript) 14.6 KiB (asset) 306 bytes (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
dependent modules 8.86 KiB (javascript) 14.6 KiB (asset) [dependent] 3 modules
|
||||
runtime modules 306 bytes 2 modules
|
||||
./example.js 742 bytes [built] [code generated]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
|
@ -1,30 +0,0 @@
|
|||
import png from "./images/file.png";
|
||||
import jpg from "./images/file.jpg";
|
||||
import svg from "./images/file.svg";
|
||||
|
||||
const container = document.createElement("div");
|
||||
Object.assign(container.style, {
|
||||
display: "flex",
|
||||
justifyContent: "center"
|
||||
});
|
||||
document.body.appendChild(container);
|
||||
|
||||
function createImageElement(title, src) {
|
||||
const div = document.createElement("div");
|
||||
div.style.textAlign = "center";
|
||||
|
||||
const h2 = document.createElement("h2");
|
||||
h2.textContent = title;
|
||||
div.appendChild(h2);
|
||||
|
||||
const img = document.createElement("img");
|
||||
img.setAttribute("src", src);
|
||||
img.setAttribute("width", "150");
|
||||
div.appendChild(img);
|
||||
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
[png, jpg, svg].forEach(src => {
|
||||
createImageElement(src.split(".").pop(), src);
|
||||
});
|
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 656 B |
|
@ -0,0 +1,488 @@
|
|||
This is a very simple example that shows the usage of the asset module type.
|
||||
|
||||
Files can be imported like other modules without file-loader.
|
||||
|
||||
# example.js
|
||||
|
||||
```javascript
|
||||
// There are different ways to use files:
|
||||
|
||||
// 1. Using `import something from "./file.ext";`
|
||||
|
||||
// return URLs or Data URL, depends on your configuration
|
||||
import png from "./images/file.png";
|
||||
import jpg from "./images/file.jpg";
|
||||
import svg from "./images/file.svg";
|
||||
|
||||
// 2. Using `import something from "./file.ext"; with { type: "text" }` or `import something from "./file.ext"; with { type: "bytes" }`
|
||||
// You don't need extra options in your configuration for these imports, they work out of the box
|
||||
|
||||
// returns the content as text
|
||||
import text from "./content/file.text" with { type: "text" };
|
||||
|
||||
// returns the content as `Uint8Array`
|
||||
import bytes from "./content/bytes.svg" with { type: "bytes" };
|
||||
|
||||
// 3. Using `new URL("./file.ext", import.meta.url);`
|
||||
// You don't need extra options in your configuration for `new URL(...)` construction, they work out of the box
|
||||
const url = new URL("./images/url.svg", import.meta.url);
|
||||
|
||||
const container = document.createElement("div");
|
||||
|
||||
Object.assign(container.style, {
|
||||
display: "flex",
|
||||
flexWrap: "wrap",
|
||||
justifyContent: "center"
|
||||
});
|
||||
document.body.appendChild(container);
|
||||
|
||||
function createImageElement(div, data) {
|
||||
const img = document.createElement("img");
|
||||
img.setAttribute("src", data);
|
||||
img.setAttribute("width", "150");
|
||||
div.appendChild(img);
|
||||
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
function createTextElement(div, data) {
|
||||
const context = document.createElement("div");
|
||||
context.textContent = data;
|
||||
div.appendChild(context);
|
||||
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
function createBlobElement(div, data) {
|
||||
const blob = new Blob([data], { type: 'image/svg+xml' });
|
||||
const blobUrl = URL.createObjectURL(blob);
|
||||
|
||||
const img = document.createElement("img");
|
||||
|
||||
img.setAttribute("src", blobUrl);
|
||||
img.setAttribute("width", "150");
|
||||
div.appendChild(img);
|
||||
|
||||
container.appendChild(div);
|
||||
|
||||
img.addEventListener(
|
||||
'load',
|
||||
() => { URL.revokeObjectURL(blobUrl) },
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
|
||||
const files = [
|
||||
{
|
||||
title: "import png from \"./images/file.png\";",
|
||||
data: png,
|
||||
render: createImageElement,
|
||||
},
|
||||
{
|
||||
title: "import jpg from \"./images/file.jpg\";",
|
||||
data: jpg,
|
||||
render: createImageElement,
|
||||
},
|
||||
{
|
||||
title: "import svg from \"./images/file.svg\";",
|
||||
data: svg,
|
||||
render: createImageElement,
|
||||
},
|
||||
{
|
||||
title: "import text from \"./content/file.text\" with { type: \"text\" };",
|
||||
data: text,
|
||||
render: createTextElement,
|
||||
},
|
||||
{
|
||||
title: "import bytes from \"./content/file.text\" with { type: \"bytes\" };",
|
||||
data: bytes,
|
||||
render: createBlobElement,
|
||||
},
|
||||
{
|
||||
title: "new URL(\"./url.svg\", import.meta.url);",
|
||||
data: url,
|
||||
render: createImageElement,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
function render(title, data, fn) {
|
||||
const div = document.createElement("div");
|
||||
div.style.textAlign = "center";
|
||||
div.style.width = "50%";
|
||||
|
||||
const h2 = document.createElement("h2");
|
||||
h2.textContent = title;
|
||||
div.appendChild(h2);
|
||||
|
||||
fn(div, data)
|
||||
}
|
||||
|
||||
files.forEach(item => {
|
||||
render(item.title, item.data, item.render);
|
||||
});
|
||||
```
|
||||
|
||||
# webpack.config.js
|
||||
|
||||
```javascript
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
assetModuleFilename: "images/[hash][ext]"
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /file\.(png|jpg|svg)$/,
|
||||
type: "asset"
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
# js/output.js
|
||||
|
||||
```javascript
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */,
|
||||
/* 1 */
|
||||
/*!*************************!*\
|
||||
!*** ./images/file.png ***!
|
||||
\*************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: __webpack_require__.p, module, __webpack_require__.* */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = __webpack_require__.p + "images/89a353e9c515885abd8e.png";
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/*!*************************!*\
|
||||
!*** ./images/file.jpg ***!
|
||||
\*************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: module */
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAA...4CD/9M//Z";
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/*!*************************!*\
|
||||
!*** ./images/file.svg ***!
|
||||
\*************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: module */
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDo...vc3ZnPgo=";
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/*!************************!*\
|
||||
!*** ./images/url.svg ***!
|
||||
\************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: __webpack_require__.p, module, __webpack_require__.* */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = __webpack_require__.p + "images/afc10c70ed4ce2b33593.svg";
|
||||
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
/*!***************************!*\
|
||||
!*** ./content/file.text ***!
|
||||
\***************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: module */
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = "a Ā 𐀀 文 🦄 Text\n";
|
||||
|
||||
/***/ }),
|
||||
/* 6 */
|
||||
/*!***************************!*\
|
||||
!*** ./content/bytes.svg ***!
|
||||
\***************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: __webpack_require__.tb, module */
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = __webpack_require__.tb("PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MDAgNjAwIj48dGl0bGU+aWNvbi1zcXVhcmUtc21hbGw8L3RpdGxlPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0zMDAgLjFMNTY1IDE1MHYyOTkuOUwzMDAgNTk5LjggMzUgNDQ5LjlWMTUweiIvPjxwYXRoIGZpbGw9IiM4RUQ2RkIiIGQ9Ik01MTcuNyA0MzkuNUwzMDguOCA1NTcuOHYtOTJMNDM5IDM5NC4xbDc4LjcgNDUuNHptMTQuMy0xMi45VjE3OS40bC03Ni40IDQ0LjF2MTU5bDc2LjQgNDQuMXpNODEuNSA0MzkuNWwyMDguOSAxMTguMnYtOTJsLTEzMC4yLTcxLjYtNzguNyA0NS40em0tMTQuMy0xMi45VjE3OS40bDc2LjQgNDQuMXYxNTlsLTc2LjQgNDQuMXptOC45LTI2My4yTDI5MC40IDQyLjJ2ODlsLTEzNy4zIDc1LjUtMS4xLjYtNzUuOS00My45em00NDYuOSAwTDMwOC44IDQyLjJ2ODlMNDQ2IDIwNi44bDEuMS42IDc1LjktNDR6Ii8+PHBhdGggZmlsbD0iIzFDNzhDMCIgZD0iTTI5MC40IDQ0NC44TDE2MiAzNzQuMVYyMzQuMmwxMjguNCA3NC4xdjEzNi41em0xOC40IDBsMTI4LjQtNzAuNnYtMTQwbC0xMjguNCA3NC4xdjEzNi41ek0yOTkuNiAzMDN6bS0xMjktODVsMTI5LTcwLjlMNDI4LjUgMjE4bC0xMjguOSA3NC40LTEyOS03NC40eiIvPjwvc3ZnPgo=");
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
```
|
||||
|
||||
<details><summary><code>/* webpack runtime code */</code></summary>
|
||||
|
||||
``` js
|
||||
/************************************************************************/
|
||||
/******/ // 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/to binary */
|
||||
/******/ (() => {
|
||||
/******/ // define to binary helper
|
||||
/******/ __webpack_require__.tb = (() => {
|
||||
/******/ var table = new Uint8Array(128);
|
||||
/******/ for (var i = 0; i < 64; i++) table[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i * 4 - 205] = i;
|
||||
/******/ return (base64) => {
|
||||
/******/ var n = base64.length, bytes = new Uint8Array((n - (base64[n - 1] == '=') - (base64[n - 2] == '=')) * 3 / 4 | 0);
|
||||
/******/ for (var i = 0, j = 0; i < n;) {
|
||||
/******/ var c0 = table[base64.charCodeAt(i++)], c1 = table[base64.charCodeAt(i++)];
|
||||
/******/ var c2 = table[base64.charCodeAt(i++)], c3 = table[base64.charCodeAt(i++)];
|
||||
/******/ bytes[j++] = (c0 << 2) | (c1 >> 4);
|
||||
/******/ bytes[j++] = (c1 << 4) | (c2 >> 2);
|
||||
/******/ bytes[j++] = (c2 << 6) | c3;
|
||||
/******/ }
|
||||
/******/ return bytes
|
||||
/******/ }
|
||||
/******/ })();
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/publicPath */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.p = "dist/";
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* 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
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
``` js
|
||||
var __webpack_exports__ = {};
|
||||
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
||||
(() => {
|
||||
/*!********************!*\
|
||||
!*** ./example.js ***!
|
||||
\********************/
|
||||
/*! namespace exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: __webpack_require__, __webpack_require__.b, __webpack_require__.r, __webpack_exports__, __webpack_require__.* */
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _images_file_png__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./images/file.png */ 1);
|
||||
/* harmony import */ var _images_file_jpg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./images/file.jpg */ 2);
|
||||
/* harmony import */ var _images_file_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./images/file.svg */ 3);
|
||||
/* harmony import */ var _content_file_text__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./content/file.text */ 5);
|
||||
/* harmony import */ var _content_bytes_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./content/bytes.svg */ 6);
|
||||
// There are different ways to use files:
|
||||
|
||||
// 1. Using `import something from "./file.ext";`
|
||||
|
||||
// return URLs or Data URL, depends on your configuration
|
||||
|
||||
|
||||
|
||||
|
||||
// 2. Using `import something from "./file.ext"; with { type: "text" }` or `import something from "./file.ext"; with { type: "bytes" }`
|
||||
// You don't need extra options in your configuration for these imports, they work out of the box
|
||||
|
||||
// returns the content as text
|
||||
|
||||
|
||||
// returns the content as `Uint8Array`
|
||||
|
||||
|
||||
// 3. Using `new URL("./file.ext", import.meta.url);`
|
||||
// You don't need extra options in your configuration for `new URL(...)` construction, they work out of the box
|
||||
const url = new URL(/* asset import */ __webpack_require__(/*! ./images/url.svg */ 4), __webpack_require__.b);
|
||||
|
||||
const container = document.createElement("div");
|
||||
|
||||
Object.assign(container.style, {
|
||||
display: "flex",
|
||||
flexWrap: "wrap",
|
||||
justifyContent: "center"
|
||||
});
|
||||
document.body.appendChild(container);
|
||||
|
||||
function createImageElement(div, data) {
|
||||
const img = document.createElement("img");
|
||||
img.setAttribute("src", data);
|
||||
img.setAttribute("width", "150");
|
||||
div.appendChild(img);
|
||||
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
function createTextElement(div, data) {
|
||||
const context = document.createElement("div");
|
||||
context.textContent = data;
|
||||
div.appendChild(context);
|
||||
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
function createBlobElement(div, data) {
|
||||
const blob = new Blob([data], { type: 'image/svg+xml' });
|
||||
const blobUrl = URL.createObjectURL(blob);
|
||||
|
||||
const img = document.createElement("img");
|
||||
|
||||
img.setAttribute("src", blobUrl);
|
||||
img.setAttribute("width", "150");
|
||||
div.appendChild(img);
|
||||
|
||||
container.appendChild(div);
|
||||
|
||||
img.addEventListener(
|
||||
'load',
|
||||
() => { URL.revokeObjectURL(blobUrl) },
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
|
||||
const files = [
|
||||
{
|
||||
title: "import png from \"./images/file.png\";",
|
||||
data: _images_file_png__WEBPACK_IMPORTED_MODULE_0__,
|
||||
render: createImageElement,
|
||||
},
|
||||
{
|
||||
title: "import jpg from \"./images/file.jpg\";",
|
||||
data: _images_file_jpg__WEBPACK_IMPORTED_MODULE_1__,
|
||||
render: createImageElement,
|
||||
},
|
||||
{
|
||||
title: "import svg from \"./images/file.svg\";",
|
||||
data: _images_file_svg__WEBPACK_IMPORTED_MODULE_2__,
|
||||
render: createImageElement,
|
||||
},
|
||||
{
|
||||
title: "import text from \"./content/file.text\" with { type: \"text\" };",
|
||||
data: _content_file_text__WEBPACK_IMPORTED_MODULE_3__,
|
||||
render: createTextElement,
|
||||
},
|
||||
{
|
||||
title: "import bytes from \"./content/file.text\" with { type: \"bytes\" };",
|
||||
data: _content_bytes_svg__WEBPACK_IMPORTED_MODULE_4__,
|
||||
render: createBlobElement,
|
||||
},
|
||||
{
|
||||
title: "new URL(\"./url.svg\", import.meta.url);",
|
||||
data: url,
|
||||
render: createImageElement,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
function render(title, data, fn) {
|
||||
const div = document.createElement("div");
|
||||
div.style.textAlign = "center";
|
||||
div.style.width = "50%";
|
||||
|
||||
const h2 = document.createElement("h2");
|
||||
h2.textContent = title;
|
||||
div.appendChild(h2);
|
||||
|
||||
fn(div, data)
|
||||
}
|
||||
|
||||
files.forEach(item => {
|
||||
render(item.title, item.data, item.render);
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
```
|
||||
|
||||
# Info
|
||||
|
||||
## webpack output
|
||||
|
||||
```
|
||||
asset output.js 19.2 KiB [emitted] (name: main)
|
||||
asset images/89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: images/file.png] (auxiliary name: main)
|
||||
asset images/afc10c70ed4ce2b33593.svg 656 bytes [emitted] [immutable] [from: images/url.svg] (auxiliary name: main)
|
||||
chunk (runtime: main) output.js (main) 12.4 KiB (javascript) 15.2 KiB (asset) 1.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
dependent modules 9.59 KiB (javascript) 15.2 KiB (asset) [dependent] 6 modules
|
||||
runtime modules 1.48 KiB 5 modules
|
||||
./example.js 2.85 KiB [built] [code generated]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 656 B |
|
@ -0,0 +1 @@
|
|||
a Ā 𐀀 文 🦄 Text
|
|
@ -0,0 +1,116 @@
|
|||
// There are different ways to use files:
|
||||
|
||||
// 1. Using `import something from "./file.ext";`
|
||||
|
||||
// return URLs or Data URL, depends on your configuration
|
||||
import png from "./images/file.png";
|
||||
import jpg from "./images/file.jpg";
|
||||
import svg from "./images/file.svg";
|
||||
|
||||
// 2. Using `import something from "./file.ext"; with { type: "text" }` or `import something from "./file.ext"; with { type: "bytes" }`
|
||||
// You don't need extra options in your configuration for these imports, they work out of the box
|
||||
|
||||
// returns the content as text
|
||||
import text from "./content/file.text" with { type: "text" };
|
||||
|
||||
// returns the content as `Uint8Array`
|
||||
import bytes from "./content/bytes.svg" with { type: "bytes" };
|
||||
|
||||
// 3. Using `new URL("./file.ext", import.meta.url);`
|
||||
// You don't need extra options in your configuration for `new URL(...)` construction, they work out of the box
|
||||
const url = new URL("./images/url.svg", import.meta.url);
|
||||
|
||||
const container = document.createElement("div");
|
||||
|
||||
Object.assign(container.style, {
|
||||
display: "flex",
|
||||
flexWrap: "wrap",
|
||||
justifyContent: "center"
|
||||
});
|
||||
document.body.appendChild(container);
|
||||
|
||||
function createImageElement(div, data) {
|
||||
const img = document.createElement("img");
|
||||
img.setAttribute("src", data);
|
||||
img.setAttribute("width", "150");
|
||||
div.appendChild(img);
|
||||
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
function createTextElement(div, data) {
|
||||
const context = document.createElement("div");
|
||||
context.textContent = data;
|
||||
div.appendChild(context);
|
||||
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
function createBlobElement(div, data) {
|
||||
const blob = new Blob([data], { type: 'image/svg+xml' });
|
||||
const blobUrl = URL.createObjectURL(blob);
|
||||
|
||||
const img = document.createElement("img");
|
||||
|
||||
img.setAttribute("src", blobUrl);
|
||||
img.setAttribute("width", "150");
|
||||
div.appendChild(img);
|
||||
|
||||
container.appendChild(div);
|
||||
|
||||
img.addEventListener(
|
||||
'load',
|
||||
() => { URL.revokeObjectURL(blobUrl) },
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
|
||||
const files = [
|
||||
{
|
||||
title: "import png from \"./images/file.png\";",
|
||||
data: png,
|
||||
render: createImageElement,
|
||||
},
|
||||
{
|
||||
title: "import jpg from \"./images/file.jpg\";",
|
||||
data: jpg,
|
||||
render: createImageElement,
|
||||
},
|
||||
{
|
||||
title: "import svg from \"./images/file.svg\";",
|
||||
data: svg,
|
||||
render: createImageElement,
|
||||
},
|
||||
{
|
||||
title: "import text from \"./content/file.text\" with { type: \"text\" };",
|
||||
data: text,
|
||||
render: createTextElement,
|
||||
},
|
||||
{
|
||||
title: "import bytes from \"./content/file.text\" with { type: \"bytes\" };",
|
||||
data: bytes,
|
||||
render: createBlobElement,
|
||||
},
|
||||
{
|
||||
title: "new URL(\"./url.svg\", import.meta.url);",
|
||||
data: url,
|
||||
render: createImageElement,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
function render(title, data, fn) {
|
||||
const div = document.createElement("div");
|
||||
div.style.textAlign = "center";
|
||||
div.style.width = "50%";
|
||||
|
||||
const h2 = document.createElement("h2");
|
||||
h2.textContent = title;
|
||||
div.appendChild(h2);
|
||||
|
||||
fn(div, data)
|
||||
}
|
||||
|
||||
files.forEach(item => {
|
||||
render(item.title, item.data, item.render);
|
||||
});
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600"><title>icon-square-small</title><path fill="#FFF" d="M300 .1L565 150v299.9L300 599.8 35 449.9V150z"/><path fill="#8ED6FB" d="M517.7 439.5L308.8 557.8v-92L439 394.1l78.7 45.4zm14.3-12.9V179.4l-76.4 44.1v159l76.4 44.1zM81.5 439.5l208.9 118.2v-92l-130.2-71.6-78.7 45.4zm-14.3-12.9V179.4l76.4 44.1v159l-76.4 44.1zm8.9-263.2L290.4 42.2v89l-137.3 75.5-1.1.6-75.9-43.9zm446.9 0L308.8 42.2v89L446 206.8l1.1.6 75.9-44z"/><path fill="#1C78C0" d="M290.4 444.8L162 374.1V234.2l128.4 74.1v136.5zm18.4 0l128.4-70.6v-140l-128.4 74.1v136.5zM299.6 303zm-129-85l129-70.9L428.5 218l-128.9 74.4-129-74.4z"/></svg>
|
After Width: | Height: | Size: 656 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600"><title>icon-square-small</title><path fill="#FFF" d="M300 .1L565 150v299.9L300 599.8 35 449.9V150z"/><path fill="#8ED6FB" d="M517.7 439.5L308.8 557.8v-92L439 394.1l78.7 45.4zm14.3-12.9V179.4l-76.4 44.1v159l76.4 44.1zM81.5 439.5l208.9 118.2v-92l-130.2-71.6-78.7 45.4zm-14.3-12.9V179.4l76.4 44.1v159l-76.4 44.1zm8.9-263.2L290.4 42.2v89l-137.3 75.5-1.1.6-75.9-43.9zm446.9 0L308.8 42.2v89L446 206.8l1.1.6 75.9-44z"/><path fill="#1C78C0" d="M290.4 444.8L162 374.1V234.2l128.4 74.1v136.5zm18.4 0l128.4-70.6v-140l-128.4 74.1v136.5zM299.6 303zm-129-85l129-70.9L428.5 218l-128.9 74.4-129-74.4z"/></svg>
|
After Width: | Height: | Size: 656 B |
|
@ -7,9 +7,9 @@ module.exports = {
|
|||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(png|jpg|svg)$/,
|
||||
test: /file\.(png|jpg|svg)$/,
|
||||
type: "asset"
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
|
@ -46,7 +46,7 @@ module.exports = {
|
|||
<body>
|
||||
<!-- inlined minimized file "runtime~main.[chunkhash].js" -->
|
||||
<script>
|
||||
(()=>{"use strict";var e,r,t,o,n={},a={};function i(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={exports:{}};return n[e](t,t.exports,i),t.exports}i.m=n,e=[],i.O=(r,t,o,n)=>{if(!t){var a=1/0;for(s=0;s<e.length;s++){for(var[t,o,n]=e[s],l=!0,u=0;u<t.length;u++)(!1&n||a>=n)&&Object.keys(i.O).every(e=>i.O[e](t[u]))?t.splice(u--,1):(l=!1,n<a&&(a=n));if(l){e.splice(s--,1);var f=o();void 0!==f&&(r=f)}}return r}n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];e[s]=[t,o,n]},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var n=Object.create(null);i.r(n);var a={};r=r||[null,t({}),t([]),t(t)];for(var l=2&o&&e;("object"==typeof l||"function"==typeof l)&&!~r.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach(r=>a[r]=()=>e[r]);return a.default=()=>e,i.d(n,a),n},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce((r,t)=>(i.f[t](e,r),r),[])),i.u=e=>e+".[chunkhash].js",i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o={},i.l=(e,r,t,n)=>{if(o[e])o[e].push(r);else{var a,l;if(void 0!==t)for(var u=document.getElementsByTagName("script"),f=0;f<u.length;f++){var s=u[f];if(s.getAttribute("src")==e){a=s;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=e),o[e]=[r];var c=(r,t)=>{a.onerror=a.onload=null,clearTimeout(d);var n=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach(e=>e(t)),r)return r(t)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),l&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="dist/",(()=>{var e={354:0};i.f.j=(r,t)=>{var o=i.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(354!=r){var n=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=n);var a=i.p+i.u(r),l=new Error;i.l(a,t=>{if(i.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+n+": "+a+")",l.name="ChunkLoadError",l.type=n,l.request=a,o[1](l)}},"chunk-"+r,r)}else e[r]=0},i.O.j=r=>0===e[r];var r=(r,t)=>{var o,n,[a,l,u]=t,f=0;if(a.some(r=>0!==e[r])){for(o in l)i.o(l,o)&&(i.m[o]=l[o]);if(u)var s=u(i)}for(r&&r(t);f<a.length;f++)n=a[f],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(s)},t=self.webpackChunk=self.webpackChunk||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
|
||||
(()=>{"use strict";var e,r,t,o,n={},a={};function i(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={exports:{}};return n[e](t,t.exports,i),t.exports}i.m=n,e=[],i.O=(r,t,o,n)=>{if(!t){var a=1/0;for(s=0;s<e.length;s++){for(var[t,o,n]=e[s],l=!0,u=0;u<t.length;u++)(!1&n||a>=n)&&Object.keys(i.O).every(e=>i.O[e](t[u]))?t.splice(u--,1):(l=!1,n<a&&(a=n));if(l){e.splice(s--,1);var f=o();void 0!==f&&(r=f)}}return r}n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];e[s]=[t,o,n]},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var n=Object.create(null);i.r(n);var a={};r=r||[null,t({}),t([]),t(t)];for(var l=2&o&&e;("object"==typeof l||"function"==typeof l)&&!~r.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach(r=>a[r]=()=>e[r]);return a.default=()=>e,i.d(n,a),n},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce((r,t)=>(i.f[t](e,r),r),[])),i.u=e=>e+".[chunkhash].js",i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o={},i.l=(e,r,t,n)=>{if(o[e])o[e].push(r);else{var a,l;if(void 0!==t)for(var u=document.getElementsByTagName("script"),f=0;f<u.length;f++){var s=u[f];if(s.getAttribute("src")==e){a=s;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",i.nc&&a.setAttribute("nonce",i.nc),a.src=e),o[e]=[r];var c=(r,t)=>{a.onerror=a.onload=null,clearTimeout(d);var n=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach(e=>e(t)),r)return r(t)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),l&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="dist/",(()=>{var e={354:0};i.f.j=(r,t)=>{var o=i.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(354!=r){var n=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=n);var a=i.p+i.u(r),l=new Error;i.l(a,t=>{if(i.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+n+": "+a+")",l.name="ChunkLoadError",l.type=n,l.request=a,o[1](l)}},"chunk-"+r,r)}else e[r]=0},i.O.j=r=>0===e[r];var r=(r,t)=>{var o,n,[a,l,u]=t,f=0;if(a.some(r=>0!==e[r])){for(o in l)i.o(l,o)&&(i.m[o]=l[o]);if(u)var s=u(i)}for(r&&r(t);f<a.length;f++)n=a[f],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(s)},t=self.webpackChunk=self.webpackChunk||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
|
||||
</script>
|
||||
|
||||
<script src="dist/main.[chunkhash].js"></script>
|
||||
|
@ -215,7 +215,6 @@ module.exports = {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -394,15 +393,15 @@ asset runtime~main.[chunkhash].js 12.2 KiB [emitted] (name: runtime~main)
|
|||
asset main.[chunkhash].js 873 bytes [emitted] (name: main)
|
||||
asset 2.[chunkhash].js 285 bytes [emitted]
|
||||
asset 3.[chunkhash].js 279 bytes [emitted]
|
||||
Entrypoint main 13.1 KiB = runtime~main.[chunkhash].js 12.2 KiB main.[chunkhash].js 873 bytes
|
||||
Entrypoint main 13 KiB = runtime~main.[chunkhash].js 12.2 KiB main.[chunkhash].js 873 bytes
|
||||
chunk (runtime: runtime~main) main.[chunkhash].js (main) 55 bytes [initial] [rendered]
|
||||
> ./example main
|
||||
./example.js 55 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./example main
|
||||
chunk (runtime: runtime~main) runtime~main.[chunkhash].js (runtime~main) 7.63 KiB [entry] [rendered]
|
||||
chunk (runtime: runtime~main) runtime~main.[chunkhash].js (runtime~main) 7.6 KiB [entry] [rendered]
|
||||
> ./example main
|
||||
runtime modules 7.63 KiB 10 modules
|
||||
runtime modules 7.6 KiB 10 modules
|
||||
chunk (runtime: runtime~main) 2.[chunkhash].js 28 bytes [rendered]
|
||||
> ./async1 ./example.js 2:0-18
|
||||
./async1.js 28 bytes [built] [code generated]
|
||||
|
@ -419,19 +418,19 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset runtime~main.[chunkhash].js 2.74 KiB [emitted] [minimized] (name: runtime~main)
|
||||
asset runtime~main.[chunkhash].js 2.73 KiB [emitted] [minimized] (name: runtime~main)
|
||||
asset main.[chunkhash].js 155 bytes [emitted] [minimized] (name: main)
|
||||
asset 471.[chunkhash].js 69 bytes [emitted] [minimized]
|
||||
asset 18.[chunkhash].js 67 bytes [emitted] [minimized]
|
||||
Entrypoint main 2.89 KiB = runtime~main.[chunkhash].js 2.74 KiB main.[chunkhash].js 155 bytes
|
||||
Entrypoint main 2.88 KiB = runtime~main.[chunkhash].js 2.73 KiB main.[chunkhash].js 155 bytes
|
||||
chunk (runtime: runtime~main) 18.[chunkhash].js 28 bytes [rendered]
|
||||
> ./async1 ./example.js 2:0-18
|
||||
./async1.js 28 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
import() ./async1 ./example.js 2:0-18
|
||||
chunk (runtime: runtime~main) runtime~main.[chunkhash].js (runtime~main) 7.63 KiB [entry] [rendered]
|
||||
chunk (runtime: runtime~main) runtime~main.[chunkhash].js (runtime~main) 7.61 KiB [entry] [rendered]
|
||||
> ./example main
|
||||
runtime modules 7.63 KiB 10 modules
|
||||
runtime modules 7.61 KiB 10 modules
|
||||
chunk (runtime: runtime~main) 471.[chunkhash].js 28 bytes [rendered]
|
||||
> ./async2 ./example.js 3:0-18
|
||||
./async2.js 28 bytes [built] [code generated]
|
||||
|
|
|
@ -100,7 +100,6 @@ getTemplate("b", function(b) {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -341,11 +340,11 @@ module.exports = function() {
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 9.03 KiB [emitted] (name: main)
|
||||
asset output.js 8.99 KiB [emitted] (name: main)
|
||||
asset require_context_templates_sync_recursive_.output.js 2.27 KiB [emitted]
|
||||
chunk (runtime: main) output.js (main) 251 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 251 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
./example.js 251 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
|
@ -362,11 +361,11 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 1.84 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 1.83 KiB [emitted] [minimized] (name: main)
|
||||
asset require_context_templates_sync_recursive_.output.js 652 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) output.js (main) 251 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 251 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
./example.js 251 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
|
|
|
@ -100,7 +100,6 @@ getTemplate("b", function(b) {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -341,11 +340,11 @@ module.exports = function() {
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 8.94 KiB [emitted] (name: main)
|
||||
asset output.js 8.91 KiB [emitted] (name: main)
|
||||
asset require_context_templates_sync_recursive_.output.js 2.27 KiB [emitted]
|
||||
chunk (runtime: main) output.js (main) 266 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 266 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
./example.js 266 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
|
@ -362,11 +361,11 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 1.82 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 1.81 KiB [emitted] [minimized] (name: main)
|
||||
asset require_context_templates_sync_recursive_.output.js 652 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) output.js (main) 266 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 266 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
./example.js 266 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
|
|
|
@ -129,7 +129,6 @@ __webpack_require__.e(/*! require.ensure */ "file_js").then((function(require) {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -299,7 +298,7 @@ module.exports = "It works";
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 9.64 KiB [emitted] (name: main)
|
||||
asset output.js 9.61 KiB [emitted] (name: main)
|
||||
asset file_js.output.js 360 bytes [emitted]
|
||||
chunk (runtime: main) file_js.output.js 28 bytes [rendered]
|
||||
> ../../node_modules/bundle-loader/index.js!./file.js 7:0-14:2
|
||||
|
@ -307,9 +306,9 @@ chunk (runtime: main) file_js.output.js 28 bytes [rendered]
|
|||
[used exports unknown]
|
||||
cjs self exports reference ./file.js 1:0-14
|
||||
cjs require !!./file.js ../../node_modules/bundle-loader/index.js!./file.js 8:8-30
|
||||
chunk (runtime: main) output.js (main) 375 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 375 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
dependent modules 281 bytes [dependent] 1 module
|
||||
./example.js 94 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
|
@ -320,7 +319,7 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 1.84 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 1.83 KiB [emitted] [minimized] (name: main)
|
||||
asset file_js.output.js 94 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) file_js.output.js 28 bytes [rendered]
|
||||
> ../../node_modules/bundle-loader/index.js!./file.js 7:0-14:2
|
||||
|
@ -328,9 +327,9 @@ chunk (runtime: main) file_js.output.js 28 bytes [rendered]
|
|||
[used exports unknown]
|
||||
cjs self exports reference ./file.js 1:0-14
|
||||
cjs require !!./file.js ../../node_modules/bundle-loader/index.js!./file.js 8:8-30
|
||||
chunk (runtime: main) output.js (main) 375 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 375 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
dependent modules 281 bytes [dependent] 1 module
|
||||
./example.js 94 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
|
|
|
@ -206,7 +206,6 @@ console.log(lodash, isomorphicFetch);
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -557,8 +556,8 @@ asset react-vendors.js 1.33 KiB [emitted] (name: react-vendors)
|
|||
asset lazy_js.js 1.11 KiB [emitted]
|
||||
Entrypoint app 1.44 KiB = app.js
|
||||
Entrypoint page1 1.91 KiB = page1.js
|
||||
Entrypoint react-vendors 12.5 KiB = runtime.js 11.1 KiB react-vendors.js 1.33 KiB
|
||||
Entrypoint other-vendors 13.3 KiB = runtime.js 11.1 KiB other-vendors.js 2.13 KiB
|
||||
Entrypoint react-vendors 12.4 KiB = runtime.js 11.1 KiB react-vendors.js 1.33 KiB
|
||||
Entrypoint other-vendors 13.2 KiB = runtime.js 11.1 KiB other-vendors.js 2.13 KiB
|
||||
chunk (runtime: runtime) app.js (app) 116 bytes <{other-vendors}> <{runtime}> >{page1}< [initial] [rendered]
|
||||
> ./app.js app
|
||||
./app.js 116 bytes [built] [code generated]
|
||||
|
@ -609,19 +608,19 @@ chunk (runtime: runtime) react-vendors.js (react-vendors) 87 bytes ={runtime}= >
|
|||
harmony import specifier react ./page1.js 5:29-34
|
||||
cjs self exports reference ./node_modules/react.js 1:0-14
|
||||
entry react react-vendors
|
||||
chunk (runtime: runtime) runtime.js (runtime) 6.74 KiB ={other-vendors}= ={react-vendors}= >{app}< >{page1}< [entry] [rendered]
|
||||
chunk (runtime: runtime) runtime.js (runtime) 6.72 KiB ={other-vendors}= ={react-vendors}= >{app}< >{page1}< [entry] [rendered]
|
||||
> ./other-vendors other-vendors
|
||||
> prop-types react-vendors
|
||||
> react react-vendors
|
||||
> react-dom react-vendors
|
||||
runtime modules 6.74 KiB 10 modules
|
||||
runtime modules 6.72 KiB 10 modules
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
||||
|
||||
## Production mode
|
||||
|
||||
```
|
||||
asset runtime.js 2.36 KiB [emitted] [minimized] (name: runtime)
|
||||
asset runtime.js 2.34 KiB [emitted] [minimized] (name: runtime)
|
||||
asset page1.js 281 bytes [emitted] [minimized] (name: page1)
|
||||
asset other-vendors.js 241 bytes [emitted] [minimized] (name: other-vendors)
|
||||
asset react-vendors.js 204 bytes [emitted] [minimized] (name: react-vendors)
|
||||
|
@ -629,8 +628,8 @@ asset app.js 200 bytes [emitted] [minimized] (name: app)
|
|||
asset lazy_js.js 160 bytes [emitted] [minimized]
|
||||
Entrypoint app 200 bytes = app.js
|
||||
Entrypoint page1 281 bytes = page1.js
|
||||
Entrypoint react-vendors 2.55 KiB = runtime.js 2.36 KiB react-vendors.js 204 bytes
|
||||
Entrypoint other-vendors 2.59 KiB = runtime.js 2.36 KiB other-vendors.js 241 bytes
|
||||
Entrypoint react-vendors 2.54 KiB = runtime.js 2.34 KiB react-vendors.js 204 bytes
|
||||
Entrypoint other-vendors 2.58 KiB = runtime.js 2.34 KiB other-vendors.js 241 bytes
|
||||
chunk (runtime: runtime) app.js (app) 116 bytes <{other-vendors}> <{runtime}> >{page1}< [initial] [rendered]
|
||||
> ./app.js app
|
||||
./app.js 116 bytes [built] [code generated]
|
||||
|
@ -680,11 +679,11 @@ chunk (runtime: runtime) react-vendors.js (react-vendors) 87 bytes ={runtime}= >
|
|||
harmony import specifier react ./page1.js 5:29-34
|
||||
cjs self exports reference ./node_modules/react.js 1:0-14
|
||||
entry react react-vendors
|
||||
chunk (runtime: runtime) runtime.js (runtime) 6.74 KiB ={other-vendors}= ={react-vendors}= >{app}< >{page1}< [entry] [rendered]
|
||||
chunk (runtime: runtime) runtime.js (runtime) 6.72 KiB ={other-vendors}= ={react-vendors}= >{app}< >{page1}< [entry] [rendered]
|
||||
> ./other-vendors other-vendors
|
||||
> prop-types react-vendors
|
||||
> react react-vendors
|
||||
> react-dom react-vendors
|
||||
runtime modules 6.74 KiB 10 modules
|
||||
runtime modules 6.72 KiB 10 modules
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
||||
|
|
|
@ -223,7 +223,6 @@ module.exports = webpackAsyncContext;
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -422,9 +421,9 @@ chunk (runtime: main) 414.output.js 11 bytes [rendered]
|
|||
./node_modules/b.js 11 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
import() b ./example.js 3:0-11
|
||||
chunk (runtime: main) output.js (main) 414 bytes (javascript) 6.91 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 414 bytes (javascript) 6.89 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 6.91 KiB 10 modules
|
||||
runtime modules 6.89 KiB 10 modules
|
||||
dependent modules 171 bytes [dependent] 2 modules
|
||||
./example.js 243 bytes [built] [code generated]
|
||||
[no exports]
|
||||
|
@ -436,7 +435,7 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.89 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 2.88 KiB [emitted] [minimized] (name: main)
|
||||
asset 140.output.js 69 bytes [emitted] [minimized]
|
||||
asset 197.output.js 69 bytes [emitted] [minimized]
|
||||
asset 414.output.js 69 bytes [emitted] [minimized]
|
||||
|
@ -459,9 +458,9 @@ chunk (runtime: main) 414.output.js 11 bytes [rendered]
|
|||
./node_modules/b.js 11 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
import() b ./example.js 3:0-11
|
||||
chunk (runtime: main) output.js (main) 403 bytes (javascript) 6.65 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 403 bytes (javascript) 6.63 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 6.65 KiB 9 modules
|
||||
runtime modules 6.63 KiB 9 modules
|
||||
dependent modules 160 bytes [dependent] 1 module
|
||||
./example.js 243 bytes [built] [code generated]
|
||||
[no exports]
|
||||
|
|
|
@ -50,9 +50,9 @@ export default foo;
|
|||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */,
|
||||
/* 1 */
|
||||
/*!*******************************************************************************************!*\
|
||||
!*** ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ***!
|
||||
\*******************************************************************************************/
|
||||
/*!***************************************************************************************************************!*\
|
||||
!*** ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ***!
|
||||
\***************************************************************************************************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: module, __webpack_require__.o, __webpack_require__, __webpack_require__.e, __webpack_require__.* */
|
||||
|
@ -197,7 +197,6 @@ module.exports = webpackAsyncContext;
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -377,32 +376,32 @@ asset 717.output.js 858 bytes [emitted]
|
|||
asset 776.output.js 858 bytes [emitted]
|
||||
asset 0.output.js 856 bytes [emitted]
|
||||
chunk (runtime: main) 0.output.js 38 bytes [rendered]
|
||||
> ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
|
||||
> ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./baz.js
|
||||
./templates/baz.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
[used exports unknown]
|
||||
import() context element ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
|
||||
import() context element ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./baz.js
|
||||
chunk (runtime: main) 717.output.js 38 bytes [rendered]
|
||||
> ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
|
||||
> ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
|
||||
> ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./foo
|
||||
> ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./foo.js
|
||||
./templates/foo.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
[used exports unknown]
|
||||
import() context element ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
|
||||
import() context element ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
|
||||
import() context element ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./foo
|
||||
import() context element ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./foo.js
|
||||
chunk (runtime: main) 776.output.js 38 bytes [rendered]
|
||||
> ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
|
||||
> ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./bar.js
|
||||
./templates/bar.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
[used exports unknown]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
|
||||
chunk (runtime: main) output.js (main) 597 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./bar.js
|
||||
chunk (runtime: main) output.js (main) 597 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.5 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 160 bytes [dependent] 1 module
|
||||
./example.js 437 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
|
@ -413,34 +412,34 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.44 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 2.42 KiB [emitted] [minimized] (name: main)
|
||||
asset 717.output.js 130 bytes [emitted] [minimized]
|
||||
asset 776.output.js 130 bytes [emitted] [minimized]
|
||||
asset 0.output.js 124 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) 0.output.js 38 bytes [rendered]
|
||||
> ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
|
||||
> ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./baz.js
|
||||
./templates/baz.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
import() context element ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js
|
||||
import() context element ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./baz.js
|
||||
chunk (runtime: main) 717.output.js 38 bytes [rendered]
|
||||
> ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
|
||||
> ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
|
||||
> ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./foo
|
||||
> ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./foo.js
|
||||
./templates/foo.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
import() context element ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
|
||||
import() context element ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
|
||||
import() context element ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./foo
|
||||
import() context element ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./foo.js
|
||||
chunk (runtime: main) 776.output.js 38 bytes [rendered]
|
||||
> ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
|
||||
> ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./bar.js
|
||||
./templates/bar.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js
|
||||
chunk (runtime: main) output.js (main) 597 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ referencedExports: namespace object ./bar.js
|
||||
chunk (runtime: main) output.js (main) 597 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.5 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 160 bytes [dependent] 1 module
|
||||
./example.js 437 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
|
|
|
@ -39,9 +39,9 @@ export default foo;
|
|||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */,
|
||||
/* 1 */
|
||||
/*!***************************************************!*\
|
||||
!*** ./templates/ lazy ^\.\/.*$ namespace object ***!
|
||||
\***************************************************/
|
||||
/*!***********************************************************************!*\
|
||||
!*** ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ***!
|
||||
\***********************************************************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: module, __webpack_require__.o, __webpack_require__, __webpack_require__.e, __webpack_require__.* */
|
||||
|
@ -186,7 +186,6 @@ module.exports = webpackAsyncContext;
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -364,32 +363,32 @@ asset 717.output.js 858 bytes [emitted]
|
|||
asset 776.output.js 858 bytes [emitted]
|
||||
asset 0.output.js 856 bytes [emitted]
|
||||
chunk (runtime: main) 0.output.js 38 bytes [rendered]
|
||||
> ./baz ./templates/ lazy ^\.\/.*$ namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/.*$ namespace object ./baz.js
|
||||
> ./baz ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./baz.js
|
||||
./templates/baz.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
[used exports unknown]
|
||||
import() context element ./baz ./templates/ lazy ^\.\/.*$ namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/.*$ namespace object ./baz.js
|
||||
import() context element ./baz ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./baz.js
|
||||
chunk (runtime: main) 717.output.js 38 bytes [rendered]
|
||||
> ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo
|
||||
> ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js
|
||||
> ./foo ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./foo
|
||||
> ./foo.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./foo.js
|
||||
./templates/foo.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
[used exports unknown]
|
||||
import() context element ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo
|
||||
import() context element ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js
|
||||
import() context element ./foo ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./foo
|
||||
import() context element ./foo.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./foo.js
|
||||
chunk (runtime: main) 776.output.js 38 bytes [rendered]
|
||||
> ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js
|
||||
> ./bar ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./bar.js
|
||||
./templates/bar.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
[used exports unknown]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js
|
||||
chunk (runtime: main) output.js (main) 441 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./bar.js
|
||||
chunk (runtime: main) output.js (main) 441 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.5 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 160 bytes [dependent] 1 module
|
||||
./example.js 281 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
|
@ -400,34 +399,34 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.4 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 2.39 KiB [emitted] [minimized] (name: main)
|
||||
asset 717.output.js 130 bytes [emitted] [minimized]
|
||||
asset 776.output.js 130 bytes [emitted] [minimized]
|
||||
asset 0.output.js 124 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) 0.output.js 38 bytes [rendered]
|
||||
> ./baz ./templates/ lazy ^\.\/.*$ namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/.*$ namespace object ./baz.js
|
||||
> ./baz ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./baz.js
|
||||
./templates/baz.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
import() context element ./baz ./templates/ lazy ^\.\/.*$ namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/.*$ namespace object ./baz.js
|
||||
import() context element ./baz ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./baz.js
|
||||
chunk (runtime: main) 717.output.js 38 bytes [rendered]
|
||||
> ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo
|
||||
> ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js
|
||||
> ./foo ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./foo
|
||||
> ./foo.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./foo.js
|
||||
./templates/foo.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
import() context element ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo
|
||||
import() context element ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js
|
||||
import() context element ./foo ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./foo
|
||||
import() context element ./foo.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./foo.js
|
||||
chunk (runtime: main) 776.output.js 38 bytes [rendered]
|
||||
> ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js
|
||||
> ./bar ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./bar.js
|
||||
./templates/bar.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js
|
||||
chunk (runtime: main) output.js (main) 441 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/.*$ referencedExports: namespace object ./bar.js
|
||||
chunk (runtime: main) output.js (main) 441 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.5 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 160 bytes [dependent] 1 module
|
||||
./example.js 281 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
|
|
|
@ -39,9 +39,9 @@ export default foo;
|
|||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */,
|
||||
/* 1 */
|
||||
/*!******************************************************************************!*\
|
||||
!*** ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ***!
|
||||
\******************************************************************************/
|
||||
/*!**************************************************************************************************!*\
|
||||
!*** ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ***!
|
||||
\**************************************************************************************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: module, __webpack_require__.o, __webpack_require__, __webpack_require__.e, __webpack_require__.* */
|
||||
|
@ -178,7 +178,6 @@ module.exports = webpackAsyncContext;
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -363,36 +362,36 @@ chunk (runtime: main) 45.output.js (chunk-foo) 38 bytes [rendered]
|
|||
[used exports unknown]
|
||||
import() ./templates/foo ./example.js 1:0-62
|
||||
cjs require ./templates/foo ./example.js 6:11-37
|
||||
chunk (runtime: main) output.js (main) 565 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 565 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.5 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 160 bytes [dependent] 1 module
|
||||
./example.js 405 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
chunk (runtime: main) 792.output.js (chunk-bar-baz2) 38 bytes [rendered]
|
||||
> ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js
|
||||
> ./baz ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./baz.js
|
||||
./templates/baz.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
[used exports unknown]
|
||||
import() context element ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js
|
||||
import() context element ./baz ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./baz.js
|
||||
chunk (runtime: main) 994.output.js (chunk-bar-baz0) 38 bytes [rendered]
|
||||
> ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js
|
||||
> ./bar ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./bar.js
|
||||
./templates/bar.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
[used exports unknown]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js
|
||||
import() context element ./bar ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./bar.js
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
||||
|
||||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.42 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 2.41 KiB [emitted] [minimized] (name: main)
|
||||
asset 994.output.js 130 bytes [emitted] [minimized] (name: chunk-bar-baz0)
|
||||
asset 45.output.js 129 bytes [emitted] [minimized] (name: chunk-foo)
|
||||
asset 792.output.js 126 bytes [emitted] [minimized] (name: chunk-bar-baz2)
|
||||
|
@ -403,26 +402,26 @@ chunk (runtime: main) 45.output.js (chunk-foo) 38 bytes [rendered]
|
|||
[exports: default]
|
||||
import() ./templates/foo ./example.js 1:0-62
|
||||
cjs require ./templates/foo ./example.js 6:11-37
|
||||
chunk (runtime: main) output.js (main) 565 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 565 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.5 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 160 bytes [dependent] 1 module
|
||||
./example.js 405 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
chunk (runtime: main) 792.output.js (chunk-bar-baz2) 38 bytes [rendered]
|
||||
> ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js
|
||||
> ./baz ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./baz
|
||||
> ./baz.js ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./baz.js
|
||||
./templates/baz.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
import() context element ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js
|
||||
import() context element ./baz ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./baz
|
||||
import() context element ./baz.js ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./baz.js
|
||||
chunk (runtime: main) 994.output.js (chunk-bar-baz0) 38 bytes [rendered]
|
||||
> ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js
|
||||
> ./bar ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./bar
|
||||
> ./bar.js ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./bar.js
|
||||
./templates/bar.js 38 bytes [optional] [built] [code generated]
|
||||
[exports: default]
|
||||
import() context element ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js
|
||||
import() context element ./bar ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./bar
|
||||
import() context element ./bar.js ./templates/ lazy ^\.\/ba.*$ referencedExports: chunkName: chunk-bar-baz namespace object ./bar.js
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
||||
|
|
|
@ -144,7 +144,6 @@ require.ensure(["c"], function(require) {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -333,11 +332,11 @@ Minimized
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 9.46 KiB [emitted] (name: main)
|
||||
asset output.js 9.43 KiB [emitted] (name: main)
|
||||
asset node_modules_c_js-node_modules_d_js.output.js 562 bytes [emitted]
|
||||
chunk (runtime: main) output.js (main) 161 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 161 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
dependent modules 22 bytes [dependent] 2 modules
|
||||
./example.js 139 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
|
@ -356,11 +355,11 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 1.76 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 1.75 KiB [emitted] [minimized] (name: main)
|
||||
asset node_modules_c_js-node_modules_d_js.output.js 114 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) output.js (main) 161 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 161 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
dependent modules 22 bytes [dependent] 2 modules
|
||||
./example.js 139 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
|
|
|
@ -190,7 +190,6 @@ module.exports = {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -450,14 +449,14 @@ module.exports = function() {
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 9.08 KiB [emitted] (name: main)
|
||||
asset output.js 9.04 KiB [emitted] (name: main)
|
||||
asset pageB_js.output.js 772 bytes [emitted]
|
||||
asset pageA_js.output.js 565 bytes [emitted]
|
||||
asset pageC_js.output.js 559 bytes [emitted]
|
||||
asset reusableComponent_js.output.js 453 bytes [emitted]
|
||||
chunk (runtime: main) output.js (main) 220 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 220 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
./example.js 220 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
|
@ -493,14 +492,14 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 1.82 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 1.8 KiB [emitted] [minimized] (name: main)
|
||||
asset pageB_js.output.js 231 bytes [emitted] [minimized]
|
||||
asset reusableComponent_js.output.js 142 bytes [emitted] [minimized]
|
||||
asset pageC_js.output.js 141 bytes [emitted] [minimized]
|
||||
asset pageA_js.output.js 140 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) output.js (main) 220 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 220 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
./example.js 220 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
|
|
|
@ -163,7 +163,6 @@ __webpack_require__.r(module.exports = {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -545,7 +544,7 @@ body {
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
assets by path *.js 16.3 KiB
|
||||
assets by path *.js 16.2 KiB
|
||||
asset output.js 15.9 KiB [emitted] (name: main)
|
||||
asset 1.output.js 357 bytes [emitted]
|
||||
assets by path *.css 1.19 KiB
|
||||
|
@ -553,9 +552,9 @@ assets by path *.css 1.19 KiB
|
|||
asset 1.output.css 125 bytes [emitted]
|
||||
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: images/file.png] (auxiliary name: main)
|
||||
Entrypoint main 17 KiB (14.6 KiB) = output.js 15.9 KiB output.css 1.06 KiB 1 auxiliary asset
|
||||
chunk (runtime: main) output.js, output.css (main) 265 bytes (javascript) 454 bytes (css) 14.6 KiB (asset) 42 bytes (css-url) 42 bytes (css-import) 8.82 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js, output.css (main) 265 bytes (javascript) 454 bytes (css) 14.6 KiB (asset) 42 bytes (css-url) 42 bytes (css-import) 8.8 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 8.82 KiB 9 modules
|
||||
runtime modules 8.8 KiB 9 modules
|
||||
dependent modules 14.6 KiB (asset) 42 bytes (css-url) 454 bytes (css) 89 bytes (javascript) 42 bytes (css-import) [dependent] 6 modules
|
||||
./example.js 176 bytes [built] [code generated]
|
||||
[no exports]
|
||||
|
@ -573,17 +572,17 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
assets by path *.js 3.42 KiB
|
||||
asset output.js 3.34 KiB [emitted] [minimized] (name: main)
|
||||
assets by path *.js 3.41 KiB
|
||||
asset output.js 3.32 KiB [emitted] [minimized] (name: main)
|
||||
asset 822.output.js 87 bytes [emitted] [minimized]
|
||||
assets by path *.css 490 bytes
|
||||
asset output.css 466 bytes [emitted] (name: main)
|
||||
asset 822.output.css 24 bytes [emitted]
|
||||
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: images/file.png] (auxiliary name: main)
|
||||
Entrypoint main 3.79 KiB (14.6 KiB) = output.js 3.34 KiB output.css 466 bytes 1 auxiliary asset
|
||||
chunk (runtime: main) output.js, output.css (main) 299 bytes (javascript) 454 bytes (css) 14.6 KiB (asset) 42 bytes (css-url) 42 bytes (css-import) 8.82 KiB (runtime) [entry] [rendered]
|
||||
Entrypoint main 3.78 KiB (14.6 KiB) = output.js 3.32 KiB output.css 466 bytes 1 auxiliary asset
|
||||
chunk (runtime: main) output.js, output.css (main) 299 bytes (javascript) 454 bytes (css) 14.6 KiB (asset) 42 bytes (css-url) 42 bytes (css-import) 8.8 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 8.82 KiB 9 modules
|
||||
runtime modules 8.8 KiB 9 modules
|
||||
dependent modules 14.6 KiB (asset) 42 bytes (css-url) 119 bytes (javascript) 279 bytes (css) 42 bytes (css-import) [dependent] 4 modules
|
||||
cacheable modules 180 bytes (javascript) 175 bytes (css)
|
||||
./example.js + 2 modules 178 bytes [built] [code generated]
|
||||
|
|
|
@ -65,7 +65,7 @@ module.exports = {
|
|||
# dist/dll.js
|
||||
|
||||
```javascript
|
||||
var dll_3f097cf91db05865c656;
|
||||
var dll_266ca1cbfc9d02695cb4;
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */
|
||||
|
@ -210,7 +210,7 @@ exports.c = "c";
|
|||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module doesn't tell about it's top-level declarations so it can't be inlined
|
||||
/******/ var __webpack_exports__ = __webpack_require__(0);
|
||||
/******/ dll_3f097cf91db05865c656 = __webpack_exports__;
|
||||
/******/ dll_266ca1cbfc9d02695cb4 = __webpack_exports__;
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
|
@ -219,7 +219,7 @@ exports.c = "c";
|
|||
# dist/dll-manifest.json
|
||||
|
||||
```javascript
|
||||
{"name":"dll_3f097cf91db05865c656","content":{"./example.js":{"id":1,"buildMeta":{"exportsType":"namespace"},"exports":["a","b","c"]}}}
|
||||
{"name":"dll_266ca1cbfc9d02695cb4","content":{"./example.js":{"id":1,"buildMeta":{"exportsType":"namespace"},"exports":["a","b","c"]}}}
|
||||
```
|
||||
|
||||
# Info
|
||||
|
|
|
@ -49,18 +49,18 @@ console.log(require("module"));
|
|||
/* 0 */,
|
||||
/* 1 */
|
||||
/*!**************************************************************************!*\
|
||||
!*** delegated ./alpha.js from dll-reference alpha_a1d5c7116e082d77ec3e ***!
|
||||
!*** delegated ./alpha.js from dll-reference alpha_f9cc49fbd10480da2244 ***!
|
||||
\**************************************************************************/
|
||||
/*! unknown exports (runtime-defined) */
|
||||
/*! runtime requirements: module, __webpack_require__ */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = (__webpack_require__(/*! dll-reference alpha_a1d5c7116e082d77ec3e */ 2))(1);
|
||||
module.exports = (__webpack_require__(/*! dll-reference alpha_f9cc49fbd10480da2244 */ 2))(1);
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/*!*********************************************!*\
|
||||
!*** external "alpha_a1d5c7116e082d77ec3e" ***!
|
||||
!*** external "alpha_f9cc49fbd10480da2244" ***!
|
||||
\*********************************************/
|
||||
/*! dynamic exports */
|
||||
/*! exports [maybe provided (runtime-defined)] [no usage info] */
|
||||
|
@ -68,34 +68,34 @@ module.exports = (__webpack_require__(/*! dll-reference alpha_a1d5c7116e082d77ec
|
|||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = alpha_a1d5c7116e082d77ec3e;
|
||||
module.exports = alpha_f9cc49fbd10480da2244;
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/*!**********************************************************************!*\
|
||||
!*** delegated ./a.js from dll-reference alpha_a1d5c7116e082d77ec3e ***!
|
||||
!*** delegated ./a.js from dll-reference alpha_f9cc49fbd10480da2244 ***!
|
||||
\**********************************************************************/
|
||||
/*! unknown exports (runtime-defined) */
|
||||
/*! runtime requirements: module, __webpack_require__ */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = (__webpack_require__(/*! dll-reference alpha_a1d5c7116e082d77ec3e */ 2))(2);
|
||||
module.exports = (__webpack_require__(/*! dll-reference alpha_f9cc49fbd10480da2244 */ 2))(2);
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/*!************************************************************************!*\
|
||||
!*** delegated ./beta.js from dll-reference beta_a1d5c7116e082d77ec3e ***!
|
||||
!*** delegated ./beta.js from dll-reference beta_f9cc49fbd10480da2244 ***!
|
||||
\************************************************************************/
|
||||
/*! unknown exports (runtime-defined) */
|
||||
/*! runtime requirements: module, __webpack_require__ */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = (__webpack_require__(/*! dll-reference beta_a1d5c7116e082d77ec3e */ 5))(5);
|
||||
module.exports = (__webpack_require__(/*! dll-reference beta_f9cc49fbd10480da2244 */ 5))(5);
|
||||
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
/*!********************************************!*\
|
||||
!*** external "beta_a1d5c7116e082d77ec3e" ***!
|
||||
!*** external "beta_f9cc49fbd10480da2244" ***!
|
||||
\********************************************/
|
||||
/*! dynamic exports */
|
||||
/*! exports [maybe provided (runtime-defined)] [no usage info] */
|
||||
|
@ -103,40 +103,40 @@ module.exports = (__webpack_require__(/*! dll-reference beta_a1d5c7116e082d77ec3
|
|||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = beta_a1d5c7116e082d77ec3e;
|
||||
module.exports = beta_f9cc49fbd10480da2244;
|
||||
|
||||
/***/ }),
|
||||
/* 6 */
|
||||
/*!*********************************************************************!*\
|
||||
!*** delegated ./b.js from dll-reference beta_a1d5c7116e082d77ec3e ***!
|
||||
!*** delegated ./b.js from dll-reference beta_f9cc49fbd10480da2244 ***!
|
||||
\*********************************************************************/
|
||||
/*! unknown exports (runtime-defined) */
|
||||
/*! runtime requirements: module, __webpack_require__ */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = (__webpack_require__(/*! dll-reference beta_a1d5c7116e082d77ec3e */ 5))(6);
|
||||
module.exports = (__webpack_require__(/*! dll-reference beta_f9cc49fbd10480da2244 */ 5))(6);
|
||||
|
||||
/***/ }),
|
||||
/* 7 */
|
||||
/*!**********************************************************************!*\
|
||||
!*** delegated ./c.jsx from dll-reference beta_a1d5c7116e082d77ec3e ***!
|
||||
!*** delegated ./c.jsx from dll-reference beta_f9cc49fbd10480da2244 ***!
|
||||
\**********************************************************************/
|
||||
/*! unknown exports (runtime-defined) */
|
||||
/*! runtime requirements: module, __webpack_require__ */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = (__webpack_require__(/*! dll-reference beta_a1d5c7116e082d77ec3e */ 5))(7);
|
||||
module.exports = (__webpack_require__(/*! dll-reference beta_f9cc49fbd10480da2244 */ 5))(7);
|
||||
|
||||
/***/ }),
|
||||
/* 8 */
|
||||
/*!*****************************************************************************************!*\
|
||||
!*** delegated ../node_modules/module.js from dll-reference alpha_a1d5c7116e082d77ec3e ***!
|
||||
!*** delegated ../node_modules/module.js from dll-reference alpha_f9cc49fbd10480da2244 ***!
|
||||
\*****************************************************************************************/
|
||||
/*! unknown exports (runtime-defined) */
|
||||
/*! runtime requirements: module, __webpack_require__ */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = (__webpack_require__(/*! dll-reference alpha_a1d5c7116e082d77ec3e */ 2))(3);
|
||||
module.exports = (__webpack_require__(/*! dll-reference alpha_f9cc49fbd10480da2244 */ 2))(3);
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
|
@ -38,7 +38,7 @@ module.exports = {
|
|||
# dist/MyDll.alpha.js
|
||||
|
||||
```javascript
|
||||
var alpha_a1d5c7116e082d77ec3e;
|
||||
var alpha_f9cc49fbd10480da2244;
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */
|
||||
|
@ -131,7 +131,7 @@ module.exports = "module";
|
|||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module doesn't tell about it's top-level declarations so it can't be inlined
|
||||
/******/ var __webpack_exports__ = __webpack_require__(0);
|
||||
/******/ alpha_a1d5c7116e082d77ec3e = __webpack_exports__;
|
||||
/******/ alpha_f9cc49fbd10480da2244 = __webpack_exports__;
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
|
@ -140,7 +140,7 @@ module.exports = "module";
|
|||
# dist/alpha-manifest.json
|
||||
|
||||
```javascript
|
||||
{"name":"alpha_a1d5c7116e082d77ec3e","content":{"./alpha.js":{"id":1,"buildMeta":{}},"./a.js":{"id":2,"buildMeta":{}},"../node_modules/module.js":{"id":3,"buildMeta":{}}}}
|
||||
{"name":"alpha_f9cc49fbd10480da2244","content":{"./alpha.js":{"id":1,"buildMeta":{"treatAsCommonJs":true}},"./a.js":{"id":2,"buildMeta":{"treatAsCommonJs":true}},"../node_modules/module.js":{"id":3,"buildMeta":{"treatAsCommonJs":true}}}}
|
||||
```
|
||||
|
||||
# Info
|
||||
|
|
|
@ -49,7 +49,7 @@ module.exports = [
|
|||
# dist/vendor.js
|
||||
|
||||
```javascript
|
||||
var vendor_3fdea2c5a4937b737605;
|
||||
var vendor_a0b82f3299842d06524c;
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */
|
||||
|
@ -129,7 +129,7 @@ module.exports = "Vendor2";
|
|||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module doesn't tell about it's top-level declarations so it can't be inlined
|
||||
/******/ var __webpack_exports__ = __webpack_require__(0);
|
||||
/******/ vendor_3fdea2c5a4937b737605 = __webpack_exports__;
|
||||
/******/ vendor_a0b82f3299842d06524c = __webpack_exports__;
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
|
@ -155,18 +155,18 @@ module.exports = "pageA";
|
|||
/***/ }),
|
||||
/* 1 */
|
||||
/*!****************************************************************************!*\
|
||||
!*** delegated ./vendor.js from dll-reference vendor_3fdea2c5a4937b737605 ***!
|
||||
!*** delegated ./vendor.js from dll-reference vendor_a0b82f3299842d06524c ***!
|
||||
\****************************************************************************/
|
||||
/*! unknown exports (runtime-defined) */
|
||||
/*! runtime requirements: module, __webpack_require__ */
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
module.exports = (__webpack_require__(/*! dll-reference vendor_3fdea2c5a4937b737605 */ 2))(1);
|
||||
module.exports = (__webpack_require__(/*! dll-reference vendor_a0b82f3299842d06524c */ 2))(1);
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/*!**********************************************!*\
|
||||
!*** external "vendor_3fdea2c5a4937b737605" ***!
|
||||
!*** external "vendor_a0b82f3299842d06524c" ***!
|
||||
\**********************************************/
|
||||
/*! dynamic exports */
|
||||
/*! exports [maybe provided (runtime-defined)] [no usage info] */
|
||||
|
@ -174,7 +174,7 @@ module.exports = (__webpack_require__(/*! dll-reference vendor_3fdea2c5a4937b737
|
|||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = vendor_3fdea2c5a4937b737605;
|
||||
module.exports = vendor_a0b82f3299842d06524c;
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
|
@ -121,7 +121,6 @@ module.exports = {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -279,7 +278,7 @@ Promise.all(/*! require.ensure */[__webpack_require__.e(670), __webpack_require_
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 9.89 KiB [emitted] (name: main)
|
||||
asset output.js 9.85 KiB [emitted] (name: main)
|
||||
asset 670.output.js 344 bytes [emitted]
|
||||
asset 210.output.js 338 bytes [emitted]
|
||||
asset 425.output.js 338 bytes [emitted]
|
||||
|
@ -310,9 +309,9 @@ chunk (runtime: main) 670.output.js 21 bytes [rendered] split chunk (cache group
|
|||
require.ensure item ./a ./example.js 3:0-6:2
|
||||
require.ensure item ./a ./example.js 8:0-16:2
|
||||
cjs require ./a ./example.js 9:1-15
|
||||
chunk (runtime: main) output.js (main) 346 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 346 bytes (javascript) 4.91 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.91 KiB 6 modules
|
||||
./example.js 346 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
|
@ -352,7 +351,7 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.1 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 2.09 KiB [emitted] [minimized] (name: main)
|
||||
asset 210.output.js 81 bytes [emitted] [minimized]
|
||||
asset 425.output.js 81 bytes [emitted] [minimized]
|
||||
asset 670.output.js 81 bytes [emitted] [minimized]
|
||||
|
@ -383,9 +382,9 @@ chunk (runtime: main) 670.output.js 21 bytes [rendered] split chunk (cache group
|
|||
require.ensure item ./a ./example.js 3:0-6:2
|
||||
require.ensure item ./a ./example.js 8:0-16:2
|
||||
cjs require ./a ./example.js 9:1-15
|
||||
chunk (runtime: main) output.js (main) 346 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 346 bytes (javascript) 4.91 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.91 KiB 6 modules
|
||||
./example.js 346 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
|
|
|
@ -130,7 +130,6 @@ require.ensure(["./a"], function(require) {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -354,7 +353,7 @@ module.exports = "d";
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 9.14 KiB [emitted] (name: main)
|
||||
asset output.js 9.11 KiB [emitted] (name: main)
|
||||
asset a_js-b_js.output.js 618 bytes [emitted]
|
||||
asset c_js.output.js 341 bytes [emitted]
|
||||
asset d_js.output.js 341 bytes [emitted]
|
||||
|
@ -383,9 +382,9 @@ chunk (runtime: main) d_js.output.js 21 bytes [rendered]
|
|||
[used exports unknown]
|
||||
cjs self exports reference ./d.js 1:0-14
|
||||
cjs require ./d ./example.js 7:1-15
|
||||
chunk (runtime: main) output.js (main) 164 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 164 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
./example.js 164 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
|
@ -395,7 +394,7 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 1.82 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 1.8 KiB [emitted] [minimized] (name: main)
|
||||
asset a_js-b_js.output.js 112 bytes [emitted] [minimized]
|
||||
asset c_js.output.js 84 bytes [emitted] [minimized]
|
||||
asset d_js.output.js 84 bytes [emitted] [minimized]
|
||||
|
@ -424,9 +423,9 @@ chunk (runtime: main) d_js.output.js 21 bytes [rendered]
|
|||
[used exports unknown]
|
||||
cjs self exports reference ./d.js 1:0-14
|
||||
cjs require ./d ./example.js 7:1-15
|
||||
chunk (runtime: main) output.js (main) 164 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 164 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
./example.js 164 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
|
|
|
@ -167,7 +167,6 @@ function add() {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -336,7 +335,7 @@ __webpack_require__.e(/*! import() */ 655).then(__webpack_require__.bind(__webpa
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 11.8 KiB [emitted] (name: main)
|
||||
asset output.js 11.7 KiB [emitted] (name: main)
|
||||
asset 655.output.js 773 bytes [emitted]
|
||||
chunk (runtime: main) 655.output.js 24 bytes [rendered]
|
||||
> ./async-loaded ./example.js 6:0-24
|
||||
|
@ -344,9 +343,9 @@ chunk (runtime: main) 655.output.js 24 bytes [rendered]
|
|||
[exports: answer]
|
||||
[used exports unknown]
|
||||
import() ./async-loaded ./example.js 6:0-24
|
||||
chunk (runtime: main) output.js (main) 400 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 400 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.5 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 225 bytes [dependent] 2 modules
|
||||
./example.js 175 bytes [built] [code generated]
|
||||
[no exports]
|
||||
|
@ -358,16 +357,16 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.02 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 2.01 KiB [emitted] [minimized] (name: main)
|
||||
asset 655.output.js 124 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) 655.output.js 24 bytes [rendered]
|
||||
> ./async-loaded ./example.js 6:0-24
|
||||
./async-loaded.js 24 bytes [built] [code generated]
|
||||
[exports: answer]
|
||||
import() ./async-loaded ./example.js + 2 modules ./example.js 6:0-24
|
||||
chunk (runtime: main) output.js (main) 400 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 400 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.5 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
./example.js + 2 modules 400 bytes [built] [code generated]
|
||||
[no exports]
|
||||
[no exports used]
|
||||
|
|
|
@ -49,14 +49,14 @@ module.exports = {
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset bbcffa7c4f56815af0bf.js 36.3 KiB [emitted] [immutable] (name: main)
|
||||
asset 8fcdb60f2e0d017abc05.js 12 KiB [emitted] [immutable]
|
||||
chunk (runtime: main) bbcffa7c4f56815af0bf.js (main) 16.9 KiB (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
asset 30fb83edb03425aab690.js 36.3 KiB [emitted] [immutable] (name: main)
|
||||
asset 3491d5911ac0056845e3.js 12 KiB [emitted] [immutable]
|
||||
chunk (runtime: main) 30fb83edb03425aab690.js (main) 16.9 KiB (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
dependent modules 16.9 KiB [dependent] 2 modules
|
||||
./example.js 42 bytes [built] [code generated]
|
||||
chunk (runtime: main) 8fcdb60f2e0d017abc05.js 7.83 KiB [rendered]
|
||||
chunk (runtime: main) 3491d5911ac0056845e3.js 7.83 KiB [rendered]
|
||||
> react-dom ./example.js 2:0-22
|
||||
dependent modules 6.5 KiB [dependent] 1 module
|
||||
../../node_modules/react-dom/index.js 1.33 KiB [built] [code generated]
|
||||
|
@ -66,15 +66,15 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset 96397c7d076bf9133366.js 9.01 KiB [emitted] [immutable] [minimized] (name: main) 1 related asset
|
||||
asset 884de97388a30170a22f.js 3.55 KiB [emitted] [immutable] [minimized] 1 related asset
|
||||
chunk (runtime: main) 884de97388a30170a22f.js 7.83 KiB [rendered]
|
||||
asset eff9f67bb3cee614bbf0.js 9 KiB [emitted] [immutable] [minimized] (name: main) 1 related asset
|
||||
asset cc0dab49b9ffcc161de2.js 3.55 KiB [emitted] [immutable] [minimized] 1 related asset
|
||||
chunk (runtime: main) cc0dab49b9ffcc161de2.js 7.83 KiB [rendered]
|
||||
> react-dom ./example.js 2:0-22
|
||||
dependent modules 6.5 KiB [dependent] 1 module
|
||||
../../node_modules/react-dom/index.js 1.33 KiB [built] [code generated]
|
||||
chunk (runtime: main) 96397c7d076bf9133366.js (main) 16.9 KiB (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) eff9f67bb3cee614bbf0.js (main) 16.9 KiB (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
dependent modules 16.9 KiB [dependent] 2 modules
|
||||
./example.js 42 bytes [built] [code generated]
|
||||
webpack X.X.X compiled successfully
|
||||
|
|
|
@ -137,9 +137,9 @@ window.onLinkToPage = function onLinkToPage(name) { // name is "a" or "b"
|
|||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/*!********************************************************************!*\
|
||||
!*** ././ lazy ^\.\/.*Page$ chunkName: [request] namespace object ***!
|
||||
\********************************************************************/
|
||||
/*!***********************************************************************************************!*\
|
||||
!*** ././ lazy ^\.\/.*Page$ referencedExports: default chunkName: [request] namespace object ***!
|
||||
\***********************************************************************************************/
|
||||
/*! default exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: module, __webpack_require__.o, __webpack_require__, __webpack_require__.e, __webpack_require__.t, __webpack_require__.* */
|
||||
|
@ -351,7 +351,6 @@ render(__webpack_require__(/*! ./aPage */ 2));
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -531,40 +530,40 @@ module.exports = function() {
|
|||
```
|
||||
asset pageB.bundle.js 13 KiB [emitted] (name: pageB)
|
||||
asset pageA.bundle.js 13 KiB [emitted] (name: pageA)
|
||||
asset router_js.bundle.js 2.45 KiB [emitted]
|
||||
asset router_js.bundle.js 2.53 KiB [emitted]
|
||||
asset aPage.bundle.js 392 bytes [emitted] (name: aPage)
|
||||
asset bPage.bundle.js 392 bytes [emitted] (name: bPage)
|
||||
Entrypoint pageA 15.8 KiB = router_js.bundle.js 2.45 KiB aPage.bundle.js 392 bytes pageA.bundle.js 13 KiB
|
||||
Entrypoint pageB 15.9 KiB = router_js.bundle.js 2.45 KiB bPage.bundle.js 392 bytes pageB.bundle.js 13 KiB
|
||||
Entrypoint pageA 15.9 KiB = router_js.bundle.js 2.53 KiB aPage.bundle.js 392 bytes pageA.bundle.js 13 KiB
|
||||
Entrypoint pageB 15.9 KiB = router_js.bundle.js 2.53 KiB bPage.bundle.js 392 bytes pageB.bundle.js 13 KiB
|
||||
chunk (runtime: pageA, pageB) aPage.bundle.js (aPage) 59 bytes [initial] [rendered] reused as split chunk (cache group: default)
|
||||
> ./aPage ././ lazy ^\.\/.*Page$ chunkName: [request] namespace object ./aPage
|
||||
> ./aPage ././ lazy ^\.\/.*Page$ referencedExports: default chunkName: [request] namespace object ./aPage
|
||||
> ./aEntry pageA
|
||||
> ./router pageA
|
||||
./aPage.js 59 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
cjs require ./aPage ./aEntry.js 3:7-25
|
||||
cjs self exports reference ./aPage.js 1:0-14
|
||||
import() context element ./aPage ././ lazy ^\.\/.*Page$ chunkName: [request] namespace object ./aPage
|
||||
import() context element ./aPage ././ lazy ^\.\/.*Page$ referencedExports: default chunkName: [request] namespace object ./aPage
|
||||
chunk (runtime: pageA, pageB) bPage.bundle.js (bPage) 59 bytes [initial] [rendered] reused as split chunk (cache group: default)
|
||||
> ./bPage ././ lazy ^\.\/.*Page$ chunkName: [request] namespace object ./bPage
|
||||
> ./bPage ././ lazy ^\.\/.*Page$ referencedExports: default chunkName: [request] namespace object ./bPage
|
||||
> ./bEntry pageB
|
||||
> ./router pageB
|
||||
./bPage.js 59 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
cjs require ./bPage ./bEntry.js 3:7-25
|
||||
cjs self exports reference ./bPage.js 1:0-14
|
||||
import() context element ./bPage ././ lazy ^\.\/.*Page$ chunkName: [request] namespace object ./bPage
|
||||
chunk (runtime: pageA) pageA.bundle.js (pageA) 87 bytes (javascript) 7.61 KiB (runtime) [entry] [rendered]
|
||||
import() context element ./bPage ././ lazy ^\.\/.*Page$ referencedExports: default chunkName: [request] namespace object ./bPage
|
||||
chunk (runtime: pageA) pageA.bundle.js (pageA) 87 bytes (javascript) 7.58 KiB (runtime) [entry] [rendered]
|
||||
> ./aEntry pageA
|
||||
> ./router pageA
|
||||
runtime modules 7.61 KiB 10 modules
|
||||
runtime modules 7.58 KiB 10 modules
|
||||
./aEntry.js 87 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./aEntry pageA
|
||||
chunk (runtime: pageB) pageB.bundle.js (pageB) 87 bytes (javascript) 7.61 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageB) pageB.bundle.js (pageB) 87 bytes (javascript) 7.58 KiB (runtime) [entry] [rendered]
|
||||
> ./bEntry pageB
|
||||
> ./router pageB
|
||||
runtime modules 7.61 KiB 10 modules
|
||||
runtime modules 7.58 KiB 10 modules
|
||||
./bEntry.js 87 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./bEntry pageB
|
||||
|
@ -584,42 +583,42 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset pageA.bundle.js 2.84 KiB [emitted] [minimized] (name: pageA)
|
||||
asset pageB.bundle.js 2.84 KiB [emitted] [minimized] (name: pageB)
|
||||
asset pageA.bundle.js 2.82 KiB [emitted] [minimized] (name: pageA)
|
||||
asset pageB.bundle.js 2.82 KiB [emitted] [minimized] (name: pageB)
|
||||
asset router_js.bundle.js 538 bytes [emitted] [minimized]
|
||||
asset aPage.bundle.js 117 bytes [emitted] [minimized] (name: aPage)
|
||||
asset bPage.bundle.js 117 bytes [emitted] [minimized] (name: bPage)
|
||||
Entrypoint pageA 3.48 KiB = router_js.bundle.js 538 bytes aPage.bundle.js 117 bytes pageA.bundle.js 2.84 KiB
|
||||
Entrypoint pageB 3.48 KiB = router_js.bundle.js 538 bytes bPage.bundle.js 117 bytes pageB.bundle.js 2.84 KiB
|
||||
Entrypoint pageA 3.46 KiB = router_js.bundle.js 538 bytes aPage.bundle.js 117 bytes pageA.bundle.js 2.82 KiB
|
||||
Entrypoint pageB 3.46 KiB = router_js.bundle.js 538 bytes bPage.bundle.js 117 bytes pageB.bundle.js 2.82 KiB
|
||||
chunk (runtime: pageA, pageB) aPage.bundle.js (aPage) 59 bytes [initial] [rendered] reused as split chunk (cache group: default)
|
||||
> ./aPage ././ lazy ^\.\/.*Page$ chunkName: [request] namespace object ./aPage
|
||||
> ./aPage ././ lazy ^\.\/.*Page$ referencedExports: default chunkName: [request] namespace object ./aPage
|
||||
> ./aEntry pageA
|
||||
> ./router pageA
|
||||
./aPage.js 59 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
cjs require ./aPage ./aEntry.js 3:7-25
|
||||
cjs self exports reference ./aPage.js 1:0-14
|
||||
import() context element ./aPage ././ lazy ^\.\/.*Page$ chunkName: [request] namespace object ./aPage
|
||||
import() context element ./aPage ././ lazy ^\.\/.*Page$ referencedExports: default chunkName: [request] namespace object ./aPage
|
||||
chunk (runtime: pageA, pageB) bPage.bundle.js (bPage) 59 bytes [initial] [rendered] reused as split chunk (cache group: default)
|
||||
> ./bPage ././ lazy ^\.\/.*Page$ chunkName: [request] namespace object ./bPage
|
||||
> ./bPage ././ lazy ^\.\/.*Page$ referencedExports: default chunkName: [request] namespace object ./bPage
|
||||
> ./bEntry pageB
|
||||
> ./router pageB
|
||||
./bPage.js 59 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
cjs require ./bPage ./bEntry.js 3:7-25
|
||||
cjs self exports reference ./bPage.js 1:0-14
|
||||
import() context element ./bPage ././ lazy ^\.\/.*Page$ chunkName: [request] namespace object ./bPage
|
||||
chunk (runtime: pageA) pageA.bundle.js (pageA) 87 bytes (javascript) 7.61 KiB (runtime) [entry] [rendered]
|
||||
import() context element ./bPage ././ lazy ^\.\/.*Page$ referencedExports: default chunkName: [request] namespace object ./bPage
|
||||
chunk (runtime: pageA) pageA.bundle.js (pageA) 87 bytes (javascript) 7.58 KiB (runtime) [entry] [rendered]
|
||||
> ./aEntry pageA
|
||||
> ./router pageA
|
||||
runtime modules 7.61 KiB 10 modules
|
||||
runtime modules 7.58 KiB 10 modules
|
||||
./aEntry.js 87 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./aEntry pageA
|
||||
chunk (runtime: pageB) pageB.bundle.js (pageB) 87 bytes (javascript) 7.61 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageB) pageB.bundle.js (pageB) 87 bytes (javascript) 7.58 KiB (runtime) [entry] [rendered]
|
||||
> ./bEntry pageB
|
||||
> ./router pageB
|
||||
runtime modules 7.61 KiB 10 modules
|
||||
runtime modules 7.58 KiB 10 modules
|
||||
./bEntry.js 87 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./bEntry pageB
|
||||
|
|
|
@ -0,0 +1,149 @@
|
|||
This example demonstrates how to use webpack internal ManifestPlugin.
|
||||
|
||||
# example.js
|
||||
|
||||
```js
|
||||
import("./baz");
|
||||
```
|
||||
|
||||
# foo.txt
|
||||
|
||||
```js
|
||||
foo
|
||||
```
|
||||
|
||||
# bar.txt
|
||||
|
||||
```js
|
||||
bar
|
||||
```
|
||||
|
||||
# baz.js
|
||||
|
||||
```js
|
||||
import foo from "./foo.txt";
|
||||
import bar from "./bar.txt";
|
||||
|
||||
export default foo + bar;
|
||||
```
|
||||
|
||||
# webpack.config.js
|
||||
|
||||
```javascript
|
||||
"use strict";
|
||||
|
||||
const webpack = require("../../");
|
||||
|
||||
/** @type {webpack.Configuration} */
|
||||
module.exports = {
|
||||
devtool: "source-map",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /foo.txt/,
|
||||
type: "asset/resource"
|
||||
},
|
||||
{
|
||||
test: /bar.txt/,
|
||||
use: require.resolve("file-loader")
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ManifestPlugin({
|
||||
filename: "manifest.json"
|
||||
}),
|
||||
new webpack.ManifestPlugin({
|
||||
filename: "manifest.yml",
|
||||
handler(manifest) {
|
||||
let _manifest = "";
|
||||
for (const key in manifest) {
|
||||
if (key === "manifest.json") continue;
|
||||
_manifest += `- ${key}: '${manifest[key].filePath}'\n`;
|
||||
}
|
||||
return _manifest;
|
||||
}
|
||||
})
|
||||
]
|
||||
};
|
||||
```
|
||||
|
||||
# dist/manifest.json
|
||||
|
||||
```json
|
||||
{
|
||||
"output.js.map": "dist/output.js.map",
|
||||
"main.js": "dist/output.js",
|
||||
"bar.txt": "dist/a0145fafc7fab801e574631452de554b.txt",
|
||||
"foo.txt": "dist/3ee037f347c64cc372ad.txt",
|
||||
"1.output.js.map": "dist/1.output.js.map",
|
||||
"1.output.js": "dist/1.output.js"
|
||||
}
|
||||
```
|
||||
|
||||
# dist/manifest.yml
|
||||
|
||||
```yml
|
||||
- output.js.map: 'dist/output.js.map'
|
||||
- main.js: 'dist/output.js'
|
||||
- bar.txt: 'dist/a0145fafc7fab801e574631452de554b.txt'
|
||||
- foo.txt: 'dist/3ee037f347c64cc372ad.txt'
|
||||
- 1.output.js.map: 'dist/1.output.js.map'
|
||||
- 1.output.js: 'dist/1.output.js'
|
||||
```
|
||||
|
||||
# Info
|
||||
|
||||
## Unoptimized
|
||||
|
||||
```
|
||||
assets by path *.js 11.9 KiB
|
||||
asset output.js 9.61 KiB [emitted] (name: main) 1 related asset
|
||||
asset 1.output.js 2.3 KiB [emitted] 1 related asset
|
||||
assets by path *.txt 8 bytes
|
||||
asset 3ee037f347c64cc372ad.txt 4 bytes [emitted] [immutable] [from: foo.txt]
|
||||
asset a0145fafc7fab801e574631452de554b.txt 4 bytes [emitted] [immutable] [from: bar.txt]
|
||||
asset manifest.json 260 bytes [emitted]
|
||||
asset manifest.yml 240 bytes [emitted]
|
||||
chunk (runtime: main) output.js (main) 17 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
./example.js 17 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
chunk (runtime: main) 1.output.js 207 bytes (javascript) 4 bytes (asset) [rendered]
|
||||
> ./baz ./example.js 1:0-15
|
||||
dependent modules 122 bytes (javascript) 4 bytes (asset) [dependent] 2 modules
|
||||
./baz.js 85 bytes [built] [code generated]
|
||||
[exports: default]
|
||||
[used exports unknown]
|
||||
import() ./baz ./example.js 1:0-15
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
||||
|
||||
## Production mode
|
||||
|
||||
```
|
||||
assets by path *.js 2.17 KiB
|
||||
asset output.js 1.94 KiB [emitted] [minimized] (name: main) 1 related asset
|
||||
asset 293.output.js 237 bytes [emitted] [minimized] 1 related asset
|
||||
assets by path *.txt 8 bytes
|
||||
asset 3ee037f347c64cc372ad.txt 4 bytes [emitted] [immutable] [from: foo.txt]
|
||||
asset a0145fafc7fab801e574631452de554b.txt 4 bytes [emitted] [immutable] [from: bar.txt]
|
||||
asset manifest.json 268 bytes [emitted]
|
||||
asset manifest.yml 248 bytes [emitted]
|
||||
chunk (runtime: main) 293.output.js 4 bytes (asset) 249 bytes (javascript) [rendered]
|
||||
> ./baz ./example.js 1:0-15
|
||||
./baz.js + 2 modules 207 bytes [built] [code generated]
|
||||
[exports: default]
|
||||
import() ./baz ./example.js 1:0-15
|
||||
./foo.txt 4 bytes (asset) 42 bytes (javascript) [built] [code generated]
|
||||
[no exports]
|
||||
chunk (runtime: main) output.js (main) 17 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
./example.js 17 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
|
@ -0,0 +1 @@
|
|||
bar
|
|
@ -0,0 +1,4 @@
|
|||
import foo from "./foo.txt";
|
||||
import bar from "./bar.txt";
|
||||
|
||||
export default foo + bar;
|
|
@ -0,0 +1 @@
|
|||
require("../build-common");
|
|
@ -0,0 +1 @@
|
|||
import("./baz");
|
|
@ -0,0 +1 @@
|
|||
foo
|
|
@ -0,0 +1,57 @@
|
|||
This example demonstrates how to use webpack internal ManifestPlugin.
|
||||
|
||||
# example.js
|
||||
|
||||
```js
|
||||
_{{example.js}}_
|
||||
```
|
||||
|
||||
# foo.txt
|
||||
|
||||
```js
|
||||
_{{foo.txt}}_
|
||||
```
|
||||
|
||||
# bar.txt
|
||||
|
||||
```js
|
||||
_{{bar.txt}}_
|
||||
```
|
||||
|
||||
# baz.js
|
||||
|
||||
```js
|
||||
_{{baz.js}}_
|
||||
```
|
||||
|
||||
# webpack.config.js
|
||||
|
||||
```javascript
|
||||
_{{webpack.config.js}}_
|
||||
```
|
||||
|
||||
# dist/manifest.json
|
||||
|
||||
```json
|
||||
_{{dist/manifest.json}}_
|
||||
```
|
||||
|
||||
# dist/manifest.yml
|
||||
|
||||
```yml
|
||||
_{{dist/manifest.yml}}_
|
||||
```
|
||||
|
||||
# Info
|
||||
|
||||
## Unoptimized
|
||||
|
||||
```
|
||||
_{{stdout}}_
|
||||
```
|
||||
|
||||
## Production mode
|
||||
|
||||
```
|
||||
_{{production:stdout}}_
|
||||
```
|
|
@ -0,0 +1,36 @@
|
|||
"use strict";
|
||||
|
||||
const webpack = require("../../");
|
||||
|
||||
/** @type {webpack.Configuration} */
|
||||
module.exports = {
|
||||
devtool: "source-map",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /foo.txt/,
|
||||
type: "asset/resource"
|
||||
},
|
||||
{
|
||||
test: /bar.txt/,
|
||||
use: require.resolve("file-loader")
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ManifestPlugin({
|
||||
filename: "manifest.json"
|
||||
}),
|
||||
new webpack.ManifestPlugin({
|
||||
filename: "manifest.yml",
|
||||
handler(manifest) {
|
||||
let _manifest = "";
|
||||
for (const key in manifest) {
|
||||
if (key === "manifest.json") continue;
|
||||
_manifest += `- ${key}: '${manifest[key].filePath}'\n`;
|
||||
}
|
||||
return _manifest;
|
||||
}
|
||||
})
|
||||
]
|
||||
};
|
|
@ -231,7 +231,6 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -492,9 +491,9 @@ module.exports = function() {
|
|||
```
|
||||
asset output.js 13.8 KiB [emitted] (name: main)
|
||||
asset require_context_templates_sync_recursive_js_.output.js 2.28 KiB [emitted]
|
||||
chunk (runtime: main) output.js (main) 1010 bytes (javascript) 5.77 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 1010 bytes (javascript) 5.75 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.77 KiB 9 modules
|
||||
runtime modules 5.75 KiB 9 modules
|
||||
dependent modules 617 bytes [dependent] 3 modules
|
||||
./example.js 396 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
|
@ -512,11 +511,11 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.51 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 2.5 KiB [emitted] [minimized] (name: main)
|
||||
asset require_context_templates_sync_recursive_js_.output.js 625 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) output.js (main) 1010 bytes (javascript) 5.77 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 1010 bytes (javascript) 5.75 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.77 KiB 9 modules
|
||||
runtime modules 5.75 KiB 9 modules
|
||||
dependent modules 617 bytes [dependent] 3 modules
|
||||
./example.js 396 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
|
|
|
@ -246,7 +246,7 @@ var e,t,o={},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=
|
|||
|
||||
```
|
||||
asset output.js 6.71 KiB [emitted] [javascript module] (name: main)
|
||||
asset 1.output.js 1.39 KiB [emitted] [javascript module]
|
||||
asset 1.output.js 1.34 KiB [emitted] [javascript module]
|
||||
chunk (runtime: main) output.js (main) 420 bytes (javascript) 3.11 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 3.11 KiB 7 modules
|
||||
|
|
|
@ -556,7 +556,6 @@ module.exports = new Promise((resolve, reject) => {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -1157,7 +1156,6 @@ __webpack_require__.d(exports, {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -1700,7 +1698,6 @@ __webpack_require__.d(exports, {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -2179,11 +2176,11 @@ mfe-c:
|
|||
```
|
||||
app:
|
||||
asset src_bootstrap_js.js 12.5 KiB [emitted] [minimized] 1 related asset
|
||||
asset app.js 7.64 KiB [emitted] [minimized] (name: app)
|
||||
asset app.js 7.62 KiB [emitted] [minimized] (name: app)
|
||||
asset node_modules_react_index_js.js 7.44 KiB [emitted] [minimized] 1 related asset
|
||||
chunk (runtime: app) app.js (app) 672 bytes (javascript) 42 bytes (share-init) 19 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: app) app.js (app) 672 bytes (javascript) 42 bytes (share-init) 18.9 KiB (runtime) [entry] [rendered]
|
||||
> ./src/index.js app
|
||||
runtime modules 19 KiB 13 modules
|
||||
runtime modules 18.9 KiB 13 modules
|
||||
built modules 672 bytes (javascript) 42 bytes (share-init) [built]
|
||||
./src/index.js 588 bytes [built] [code generated]
|
||||
external "mfeBBB@/dist/bbb/mfeBBB.js" 42 bytes [built] [code generated]
|
||||
|
@ -2207,11 +2204,11 @@ app:
|
|||
mfe-b:
|
||||
asset vendors-node_modules_date-fns_index_js.js 70.4 KiB [emitted] [minimized] (id hint: vendors)
|
||||
asset node_modules_react_index_js.js 7.44 KiB [emitted] [minimized] 1 related asset
|
||||
asset mfeBBB.js 6.31 KiB [emitted] [minimized] (name: mfeBBB)
|
||||
asset mfeBBB.js 6.3 KiB [emitted] [minimized] (name: mfeBBB)
|
||||
asset src-b_Component_js.js 489 bytes [emitted] [minimized]
|
||||
chunk (runtime: mfeBBB) mfeBBB.js (mfeBBB) 42 bytes (javascript) 84 bytes (share-init) 16.1 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: mfeBBB) mfeBBB.js (mfeBBB) 42 bytes (javascript) 84 bytes (share-init) 16 KiB (runtime) [entry] [rendered]
|
||||
> mfeBBB
|
||||
runtime modules 16.1 KiB 11 modules
|
||||
runtime modules 16 KiB 11 modules
|
||||
built modules 42 bytes (javascript) 84 bytes (share-init) [built]
|
||||
container entry 42 bytes [built] [code generated]
|
||||
provide shared module (default) date-fns@4.1.0 = ../../node_modules/dat...(truncated) 42 bytes [built] [code generated]
|
||||
|
@ -2233,7 +2230,7 @@ mfe-b:
|
|||
|
||||
mfe-c:
|
||||
asset vendors-node_modules_date-fns_index_js.js 70.4 KiB [emitted] [minimized] (id hint: vendors)
|
||||
asset mfeCCC.js 6.85 KiB [emitted] [minimized] (name: mfeCCC)
|
||||
asset mfeCCC.js 6.84 KiB [emitted] [minimized] (name: mfeCCC)
|
||||
asset node_modules_lodash_random_js.js 3.13 KiB [emitted] [minimized]
|
||||
asset src-c_LazyComponent_js.js 533 bytes [emitted] [minimized]
|
||||
asset src-c_Component_js.js 488 bytes [emitted] [minimized]
|
||||
|
|
|
@ -239,7 +239,6 @@ __webpack_require__.e(/*! AMD require */ "shared_js").then(function() { var __WE
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -513,7 +512,6 @@ __webpack_require__.e(/*! require.ensure */ "shared_js").then((function(require)
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -684,7 +682,7 @@ asset pageA.js 10.7 KiB [emitted] (name: pageA)
|
|||
asset pageB.js 10.6 KiB [emitted] (name: pageB)
|
||||
asset shared_js.js 515 bytes [emitted]
|
||||
asset commons.js 370 bytes [emitted] (name: commons) (id hint: commons)
|
||||
Entrypoint pageA 11.1 KiB = commons.js 370 bytes pageA.js 10.7 KiB
|
||||
Entrypoint pageA 11 KiB = commons.js 370 bytes pageA.js 10.7 KiB
|
||||
Entrypoint pageB 11 KiB = commons.js 370 bytes pageB.js 10.6 KiB
|
||||
chunk (runtime: pageA, pageB) commons.js (commons) (id hint: commons) 26 bytes [initial] [rendered] split chunk (cache group: commons) (name: commons)
|
||||
> ./pageA pageA
|
||||
|
@ -695,15 +693,15 @@ chunk (runtime: pageA, pageB) commons.js (commons) (id hint: commons) 26 bytes [
|
|||
cjs require ./common ./pageA.js 1:13-32
|
||||
cjs require ./common ./pageB.js 1:13-32
|
||||
cjs require ./common ./shared.js 1:13-32
|
||||
chunk (runtime: pageA) pageA.js (pageA) 105 bytes (javascript) 5.88 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageA) pageA.js (pageA) 105 bytes (javascript) 5.86 KiB (runtime) [entry] [rendered]
|
||||
> ./pageA pageA
|
||||
runtime modules 5.88 KiB 7 modules
|
||||
runtime modules 5.86 KiB 7 modules
|
||||
./pageA.js 105 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./pageA pageA
|
||||
chunk (runtime: pageB) pageB.js (pageB) 148 bytes (javascript) 5.88 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageB) pageB.js (pageB) 148 bytes (javascript) 5.86 KiB (runtime) [entry] [rendered]
|
||||
> ./pageB pageB
|
||||
runtime modules 5.88 KiB 7 modules
|
||||
runtime modules 5.86 KiB 7 modules
|
||||
./pageB.js 148 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
entry ./pageB pageB
|
||||
|
@ -723,12 +721,12 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset pageA.js 2.16 KiB [emitted] [minimized] (name: pageA)
|
||||
asset pageB.js 2.13 KiB [emitted] [minimized] (name: pageB)
|
||||
asset pageA.js 2.14 KiB [emitted] [minimized] (name: pageA)
|
||||
asset pageB.js 2.12 KiB [emitted] [minimized] (name: pageB)
|
||||
asset shared_js.js 125 bytes [emitted] [minimized]
|
||||
asset commons.js 92 bytes [emitted] [minimized] (name: commons) (id hint: commons)
|
||||
Entrypoint pageA 2.25 KiB = commons.js 92 bytes pageA.js 2.16 KiB
|
||||
Entrypoint pageB 2.22 KiB = commons.js 92 bytes pageB.js 2.13 KiB
|
||||
Entrypoint pageA 2.23 KiB = commons.js 92 bytes pageA.js 2.14 KiB
|
||||
Entrypoint pageB 2.21 KiB = commons.js 92 bytes pageB.js 2.12 KiB
|
||||
chunk (runtime: pageA, pageB) commons.js (commons) (id hint: commons) 26 bytes [initial] [rendered] split chunk (cache group: commons) (name: commons)
|
||||
> ./pageA pageA
|
||||
> ./pageB pageB
|
||||
|
@ -738,15 +736,15 @@ chunk (runtime: pageA, pageB) commons.js (commons) (id hint: commons) 26 bytes [
|
|||
cjs require ./common ./pageA.js 1:13-32
|
||||
cjs require ./common ./pageB.js 1:13-32
|
||||
cjs require ./common ./shared.js 1:13-32
|
||||
chunk (runtime: pageA) pageA.js (pageA) 105 bytes (javascript) 5.88 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageA) pageA.js (pageA) 105 bytes (javascript) 5.86 KiB (runtime) [entry] [rendered]
|
||||
> ./pageA pageA
|
||||
runtime modules 5.88 KiB 7 modules
|
||||
runtime modules 5.86 KiB 7 modules
|
||||
./pageA.js 105 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./pageA pageA
|
||||
chunk (runtime: pageB) pageB.js (pageB) 148 bytes (javascript) 5.88 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: pageB) pageB.js (pageB) 148 bytes (javascript) 5.86 KiB (runtime) [entry] [rendered]
|
||||
> ./pageB pageB
|
||||
runtime modules 5.88 KiB 7 modules
|
||||
runtime modules 5.86 KiB 7 modules
|
||||
./pageB.js 148 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./pageB pageB
|
||||
|
|
|
@ -122,7 +122,6 @@ require.ensure(["b"], function(require) {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -362,12 +361,12 @@ __webpack_require__.e(/*! require.ensure */ "node_modules_b_js-node_modules_d_js
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 9.85 KiB [emitted] (name: main)
|
||||
asset output.js 9.81 KiB [emitted] (name: main)
|
||||
asset my own chunk.output.js 746 bytes [emitted] (name: my own chunk)
|
||||
asset node_modules_b_js-node_modules_d_js.output.js 562 bytes [emitted]
|
||||
chunk (runtime: main) output.js (main) 432 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 432 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
dependent modules 11 bytes [dependent] 1 module
|
||||
./example.js 421 bytes [built] [code generated]
|
||||
[used exports unknown]
|
||||
|
@ -405,12 +404,12 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 1.94 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 1.92 KiB [emitted] [minimized] (name: main)
|
||||
asset my own chunk.output.js 140 bytes [emitted] [minimized] (name: my own chunk)
|
||||
asset node_modules_b_js-node_modules_d_js.output.js 114 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) output.js (main) 432 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 432 bytes (javascript) 4.92 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 4.94 KiB 6 modules
|
||||
runtime modules 4.92 KiB 6 modules
|
||||
dependent modules 11 bytes [dependent] 1 module
|
||||
./example.js 421 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
|
|
|
@ -59,28 +59,28 @@ module.exports = (env = "development") => ({
|
|||
|
||||
```
|
||||
asset output.js 3.61 MiB [emitted] (name: main)
|
||||
chunk (runtime: main) output.js (main) 2.24 MiB (javascript) 1.29 KiB (runtime) [entry]
|
||||
chunk (runtime: main) output.js (main) 2.25 MiB (javascript) 1.29 KiB (runtime) [entry]
|
||||
> ./example.js main
|
||||
cached modules 2.24 MiB (javascript) 1.29 KiB (runtime) [cached] 1516 modules
|
||||
cached modules 2.25 MiB (javascript) 1.29 KiB (runtime) [cached] 1523 modules
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
||||
|
||||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 548 KiB [emitted] [minimized] [big] (name: main) 1 related asset
|
||||
asset output.js 549 KiB [emitted] [minimized] [big] (name: main) 1 related asset
|
||||
chunk (runtime: main) output.js (main) 2.19 MiB (javascript) 1.29 KiB (runtime) [entry]
|
||||
> ./example.js main
|
||||
cached modules 2.19 MiB (javascript) 1.29 KiB (runtime) [cached] 893 modules
|
||||
cached modules 2.19 MiB (javascript) 1.29 KiB (runtime) [cached] 900 modules
|
||||
|
||||
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
|
||||
This can impact web performance.
|
||||
Assets:
|
||||
output.js (548 KiB)
|
||||
output.js (549 KiB)
|
||||
|
||||
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
|
||||
Entrypoints:
|
||||
main (548 KiB)
|
||||
main (549 KiB)
|
||||
output.js
|
||||
|
||||
WARNING in webpack performance recommendations:
|
||||
|
|
|
@ -204,9 +204,9 @@ const Login = () => {
|
|||
asset output.js 11 KiB [emitted] (name: main)
|
||||
asset pages_Login_js.output.js 2.82 KiB [emitted]
|
||||
asset pages_Dashboard_js.output.js 2.78 KiB [emitted]
|
||||
chunk (runtime: main) output.js (main) 208 bytes (javascript) 5.51 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 208 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.51 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 160 bytes [dependent] 1 module
|
||||
./example.js 48 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
|
@ -233,12 +233,12 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.47 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 2.46 KiB [emitted] [minimized] (name: main)
|
||||
asset pages_Dashboard_js.output.js 450 bytes [emitted] [minimized]
|
||||
asset pages_Login_js.output.js 444 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) output.js (main) 208 bytes (javascript) 5.51 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 208 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.51 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 160 bytes [dependent] 1 module
|
||||
./example.js 48 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
|
|
|
@ -240,7 +240,6 @@ var x = "x";
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -426,21 +425,17 @@ __webpack_require__.e(/*! import() */ "lazy_js").then(__webpack_require__.bind(_
|
|||
!*** ./lazy.js + 2 modules ***!
|
||||
\*****************************/
|
||||
/*! namespace exports */
|
||||
/*! export c [provided] [maybe used in main (runtime-defined)] [usage prevents renaming] -> ./node_modules/c.js .c */
|
||||
/*! export d [provided] [maybe used in main (runtime-defined)] [usage prevents renaming] -> ./node_modules/d.js */
|
||||
/*! export a [provided] [maybe used in main (runtime-defined)] [usage prevents renaming] */
|
||||
/*! other exports [not provided] [maybe used in main (runtime-defined)] */
|
||||
/*! export x [provided] [maybe used in main (runtime-defined)] [usage prevents renaming] -> ./node_modules/shared.js + 1 modules .x */
|
||||
/*! export y [provided] [maybe used in main (runtime-defined)] [usage prevents renaming] -> ./node_modules/shared2.js .y */
|
||||
/*! other exports [not provided] [maybe used in main (runtime-defined)] */
|
||||
/*! export c [provided] [used in main] [usage prevents renaming] -> ./node_modules/c.js .c */
|
||||
/*! export d [provided] [only properties used in main] [usage prevents renaming] -> ./node_modules/d.js */
|
||||
/*! export a [provided] [used in main] [usage prevents renaming] */
|
||||
/*! export x [provided] [used in main] [usage prevents renaming] -> ./node_modules/shared.js + 1 modules .x */
|
||||
/*! export y [provided] [used in main] [usage prevents renaming] -> ./node_modules/shared2.js .y */
|
||||
/*! runtime requirements: __webpack_exports__, __webpack_require__.d, __webpack_require__.r, __webpack_require__, __webpack_require__.* */
|
||||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/cjs.js: Module is not an ECMAScript module */
|
||||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shared.js: Module ./node_modules/shared.js is not in the same chunk(s) (expected in chunk(s) unnamed chunk(s), module is in chunk(s) ) */
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
|
@ -501,7 +496,7 @@ exports.c = "e";
|
|||
Minimized
|
||||
|
||||
```javascript
|
||||
(self.webpackChunk=self.webpackChunk||[]).push([["lazy_js"],{207:(r,a,e)=>{"use strict";e.r(a),e.d(a,{c:()=>C,d:()=>c,x:()=>s.x,y:()=>h.y});var c={};e.r(c),e.d(c,{a:()=>k});var d=e(330),s=e(331),h=e(453),C=String.fromCharCode(d.c.charCodeAt(0)-2),k="d"},330:(r,a)=>{a.c="e"}}]);
|
||||
(self.webpackChunk=self.webpackChunk||[]).push([["lazy_js"],{207:(a,e,r)=>{"use strict";r.d(e,{c:()=>C,d:()=>c,x:()=>s.x,y:()=>h.y});var c={};r.r(c),r.d(c,{a:()=>k});var d=r(330),s=r(331),h=r(453),C=String.fromCharCode(d.c.charCodeAt(0)-2),k="d"},330:(a,e)=>{e.c="e"}}]);
|
||||
```
|
||||
|
||||
# Info
|
||||
|
@ -509,17 +504,18 @@ Minimized
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 11.1 KiB [emitted] (name: main)
|
||||
asset lazy_js.output.js 2.67 KiB [emitted]
|
||||
asset output.js 11 KiB [emitted] (name: main)
|
||||
asset lazy_js.output.js 2.36 KiB [emitted]
|
||||
chunk (runtime: main) lazy_js.output.js 263 bytes [rendered]
|
||||
> ./lazy ./example.js 4:0-16
|
||||
dependent modules 42 bytes [dependent] 1 module
|
||||
./lazy.js + 2 modules 221 bytes [built] [code generated]
|
||||
[exports: c, d, x, y]
|
||||
[all exports used]
|
||||
import() ./lazy ./example.js + 2 modules ./example.js 4:0-16
|
||||
chunk (runtime: main) output.js (main) 367 bytes (javascript) 5.51 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 367 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.51 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 100 bytes [dependent] 1 module
|
||||
./example.js + 2 modules 267 bytes [built] [code generated]
|
||||
[no exports]
|
||||
|
@ -531,17 +527,18 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.1 KiB [emitted] [minimized] (name: main)
|
||||
asset lazy_js.output.js 278 bytes [emitted] [minimized]
|
||||
asset output.js 2.09 KiB [emitted] [minimized] (name: main)
|
||||
asset lazy_js.output.js 271 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) lazy_js.output.js 263 bytes [rendered]
|
||||
> ./lazy ./example.js 4:0-16
|
||||
dependent modules 42 bytes [dependent] 1 module
|
||||
./lazy.js + 2 modules 221 bytes [built] [code generated]
|
||||
[exports: c, d, x, y]
|
||||
[all exports used]
|
||||
import() ./lazy ./example.js + 2 modules ./example.js 4:0-16
|
||||
chunk (runtime: main) output.js (main) 367 bytes (javascript) 5.51 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 367 bytes (javascript) 5.48 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.51 KiB 8 modules
|
||||
runtime modules 5.48 KiB 8 modules
|
||||
dependent modules 100 bytes [dependent] 2 modules
|
||||
./example.js + 2 modules 267 bytes [built] [code generated]
|
||||
[no exports]
|
||||
|
|
|
@ -0,0 +1,209 @@
|
|||
This example demonstrates various types of source-maps.
|
||||
|
||||
# example.js
|
||||
|
||||
```js
|
||||
import { greet } from "library";
|
||||
|
||||
// Valid value
|
||||
console.log(greet("world"));
|
||||
// Wrong value
|
||||
console.log(greet(128));
|
||||
```
|
||||
|
||||
# node_modules/library/src/index.ts
|
||||
|
||||
```typescript
|
||||
const greet = (name: string) => {
|
||||
if (typeof name !== "string") {
|
||||
throw new TypeError("Invalid name type");
|
||||
}
|
||||
|
||||
return `Hello, ${name}!`;
|
||||
};
|
||||
|
||||
export { greet }
|
||||
```
|
||||
|
||||
# node_modules/library/lib/index.js
|
||||
|
||||
```js
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.greet = void 0;
|
||||
var greet = function (name) {
|
||||
if (typeof name !== "string") {
|
||||
throw new TypeError("Invalid name type");
|
||||
}
|
||||
return "Hello, ".concat(name, "!");
|
||||
};
|
||||
exports.greet = greet;
|
||||
//# sourceMappingURL=index.js.map
|
||||
```
|
||||
|
||||
# node_modules/library/lib/index.js.map
|
||||
|
||||
```json
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,IAAM,KAAK,GAAG,UAAC,IAAY;IAC1B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,iBAAU,IAAI,MAAG,CAAC;AAC1B,CAAC,CAAC;AAEO,sBAAK"}
|
||||
```
|
||||
|
||||
# webpack.config.js
|
||||
|
||||
```javascript
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
devtool: "source-map",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/i,
|
||||
extractSourceMap: true
|
||||
}
|
||||
]
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
# dist/output.js
|
||||
|
||||
```javascript
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */,
|
||||
/* 1 */
|
||||
/*!*******************************************!*\
|
||||
!*** ./node_modules/library/lib/index.js ***!
|
||||
\*******************************************/
|
||||
/*! flagged exports */
|
||||
/*! export __esModule [provided] [no usage info] [missing usage info prevents renaming] */
|
||||
/*! export greet [provided] [no usage info] [missing usage info prevents renaming] */
|
||||
/*! other exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: __webpack_exports__ */
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.greet = void 0;
|
||||
var greet = function (name) {
|
||||
if (typeof name !== "string") {
|
||||
throw new TypeError("Invalid name type");
|
||||
}
|
||||
return "Hello, ".concat(name, "!");
|
||||
};
|
||||
exports.greet = greet;
|
||||
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
```
|
||||
|
||||
<details><summary><code>/* webpack runtime code */</code></summary>
|
||||
|
||||
``` js
|
||||
/************************************************************************/
|
||||
/******/ // 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 });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
``` js
|
||||
var __webpack_exports__ = {};
|
||||
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
||||
(() => {
|
||||
/*!********************!*\
|
||||
!*** ./example.js ***!
|
||||
\********************/
|
||||
/*! namespace exports */
|
||||
/*! exports [not provided] [no usage info] */
|
||||
/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.* */
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! library */ 1);
|
||||
|
||||
|
||||
// Valid value
|
||||
console.log((0,library__WEBPACK_IMPORTED_MODULE_0__.greet)("world"));
|
||||
// Wrong value
|
||||
console.log((0,library__WEBPACK_IMPORTED_MODULE_0__.greet)(128));
|
||||
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=output.js.map
|
||||
```
|
||||
|
||||
# dist/output.js.map
|
||||
|
||||
```json
|
||||
{"version":3,"file":"output.js","mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAM,KAAK,GAAG,UAAC,IAAY;IAC1B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,iBAAU,IAAI,MAAG,CAAC;AAC1B,CAAC,CAAC;AAEO,sBAAK;;;;;;UCRd;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;ACNgC;;AAEhC;AACA,YAAY,8CAAK;AACjB;AACA,YAAY,8CAAK","sources":["webpack:///./node_modules/library/src/index.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/make namespace object","webpack:///./example.js"],"sourcesContent":["const greet = (name: string) => {\n\tif (typeof name !== \"string\") {\n\t\tthrow new TypeError(\"Invalid name type\");\n\t}\n\n\treturn `Hello, ${name}!`;\n};\n\nexport { greet }\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { greet } from \"library\";\n\n// Valid value\nconsole.log(greet(\"world\"));\n// Wrong value\nconsole.log(greet(128));\n"],"names":[],"sourceRoot":""}
|
||||
```
|
||||
|
||||
# Info
|
||||
|
||||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 3.18 KiB [emitted] (name: main) 1 related asset
|
||||
chunk (runtime: main) output.js (main) 407 bytes (javascript) 274 bytes (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
dependent modules 289 bytes [dependent] 1 module
|
||||
runtime modules 274 bytes 1 module
|
||||
./example.js 118 bytes [built] [code generated]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
entry ./example.js main
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
||||
|
||||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 386 bytes [emitted] [minimized] (name: main) 1 related asset
|
||||
chunk (runtime: main) output.js (main) 407 bytes [entry] [rendered]
|
||||
> ./example.js main
|
||||
dependent modules 289 bytes [dependent] 1 module
|
||||
./example.js 118 bytes [built] [code generated]
|
||||
[no exports]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
webpack X.X.X compiled successfully
|
||||
```
|
|
@ -0,0 +1 @@
|
|||
require("../build-common");
|
|
@ -0,0 +1,6 @@
|
|||
import { greet } from "library";
|
||||
|
||||
// Valid value
|
||||
console.log(greet("world"));
|
||||
// Wrong value
|
||||
console.log(greet(128));
|
|
@ -0,0 +1,11 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.greet = void 0;
|
||||
var greet = function (name) {
|
||||
if (typeof name !== "string") {
|
||||
throw new TypeError("Invalid name type");
|
||||
}
|
||||
return "Hello, ".concat(name, "!");
|
||||
};
|
||||
exports.greet = greet;
|
||||
//# sourceMappingURL=index.js.map
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,IAAM,KAAK,GAAG,UAAC,IAAY;IAC1B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,iBAAU,IAAI,MAAG,CAAC;AAC1B,CAAC,CAAC;AAEO,sBAAK"}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "library",
|
||||
"version": "1.0.0",
|
||||
"description": "Description",
|
||||
"main": "./lib/index.js"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
const greet = (name: string) => {
|
||||
if (typeof name !== "string") {
|
||||
throw new TypeError("Invalid name type");
|
||||
}
|
||||
|
||||
return `Hello, ${name}!`;
|
||||
};
|
||||
|
||||
export { greet }
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"lib": ["es5", "dom"],
|
||||
"outDir": "./lib",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": [
|
||||
"./src/index.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
This example demonstrates various types of source-maps.
|
||||
|
||||
# example.js
|
||||
|
||||
```js
|
||||
_{{example.js}}_
|
||||
```
|
||||
|
||||
# node_modules/library/src/index.ts
|
||||
|
||||
```typescript
|
||||
_{{node_modules/library/src/index.ts}}_
|
||||
```
|
||||
|
||||
# node_modules/library/lib/index.js
|
||||
|
||||
```js
|
||||
_{{node_modules/library/lib/index.js}}_
|
||||
```
|
||||
|
||||
# node_modules/library/lib/index.js.map
|
||||
|
||||
```json
|
||||
_{{node_modules/library/lib/index.js.map}}_
|
||||
```
|
||||
|
||||
# webpack.config.js
|
||||
|
||||
```javascript
|
||||
_{{webpack.config.js}}_
|
||||
```
|
||||
|
||||
# dist/output.js
|
||||
|
||||
```javascript
|
||||
_{{dist/output.js}}_
|
||||
```
|
||||
|
||||
# dist/output.js.map
|
||||
|
||||
```json
|
||||
_{{dist/output.js.map}}_
|
||||
```
|
||||
|
||||
# Info
|
||||
|
||||
## Unoptimized
|
||||
|
||||
```
|
||||
_{{stdout}}_
|
||||
```
|
||||
|
||||
## Production mode
|
||||
|
||||
```
|
||||
_{{production:stdout}}_
|
||||
```
|
|
@ -0,0 +1,14 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
devtool: "source-map",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/i,
|
||||
extractSourceMap: true
|
||||
}
|
||||
]
|
||||
},
|
||||
};
|
|
@ -80,5 +80,5 @@ LOG from webpack.FileSystemInfo
|
|||
Directory info in cache: 0 timestamps 0 hashes 0 timestamp hash combinations
|
||||
Managed items info in cache: 0 items
|
||||
|
||||
XXXX-XX-XX XXXX:XX:XX: webpack X.X.X compiled successfully (68b217a88f3561807beb)
|
||||
XXXX-XX-XX XXXX:XX:XX: webpack X.X.X compiled successfully (624a5c13e5fc64cc82e4)
|
||||
```
|
||||
|
|
|
@ -337,7 +337,6 @@ const AlternativeCreateUserAction = async name => {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -522,7 +521,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export */ });
|
||||
/* harmony import */ var _db_connection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./db-connection.js */ 3);
|
||||
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_db_connection_js__WEBPACK_IMPORTED_MODULE_0__]);
|
||||
_db_connection_js__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
||||
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
||||
_db_connection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
||||
|
||||
|
||||
const createUser = async name => {
|
||||
|
@ -579,7 +579,7 @@ __webpack_async_result__();
|
|||
## in production mode:
|
||||
|
||||
```javascript
|
||||
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["UserApi_js"],{312:(a,e,s)=>{s.a(a,async(a,t)=>{try{s.d(e,{D:()=>c});const a=async a=>{await new Promise(a=>setTimeout(a,1e3))};await a("my-sql://example.com");const c=async a=>(await new Promise(a=>setTimeout(a,100)),"fake data");t()}catch(a){t(a)}},1)},560:(a,e,s)=>{s.a(a,async(a,t)=>{try{s.r(e),s.d(e,{createUser:()=>m});var c=s(312),n=a([c]);c=(n.then?(await n)():n)[0];const m=async a=>{command=`CREATE USER ${a}`,await(0,c.D)({command})};t()}catch(a){t(a)}})}}]);
|
||||
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["UserApi_js"],{312:(a,e,s)=>{s.a(a,async(a,t)=>{try{s.d(e,{D:()=>c});const a=async a=>{await new Promise(a=>setTimeout(a,1e3))};await a("my-sql://example.com");const c=async a=>(await new Promise(a=>setTimeout(a,100)),"fake data");t()}catch(a){t(a)}},1)},560:(a,e,s)=>{s.a(a,async(a,t)=>{try{s.r(e),s.d(e,{createUser:()=>i});var c=s(312),n=a([c]),m=n.then?(await n)():n;c=m[0];const i=async a=>{command=`CREATE USER ${a}`,await(0,c.D)({command})};t()}catch(a){t(a)}})}}]);
|
||||
```
|
||||
|
||||
# Info
|
||||
|
@ -588,7 +588,7 @@ __webpack_async_result__();
|
|||
|
||||
```
|
||||
asset output.js 15.1 KiB [emitted] (name: main)
|
||||
asset UserApi_js.output.js 2.97 KiB [emitted]
|
||||
asset UserApi_js.output.js 3.05 KiB [emitted]
|
||||
chunk (runtime: main) UserApi_js.output.js 617 bytes [rendered]
|
||||
> ./UserApi.js ./Actions.js 22:30-52
|
||||
> ./UserApi.js ./Actions.js 2:16-38
|
||||
|
@ -598,9 +598,9 @@ chunk (runtime: main) UserApi_js.output.js 617 bytes [rendered]
|
|||
[used exports unknown]
|
||||
import() ./UserApi.js ./Actions.js 2:16-38
|
||||
import() ./UserApi.js ./Actions.js 22:30-52
|
||||
chunk (runtime: main) output.js (main) 1.19 KiB (javascript) 7.59 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 1.19 KiB (javascript) 7.57 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 7.59 KiB 9 modules
|
||||
runtime modules 7.57 KiB 9 modules
|
||||
dependent modules 1.09 KiB [dependent] 1 module
|
||||
./example.js 103 bytes [built] [code generated]
|
||||
[no exports]
|
||||
|
@ -612,8 +612,8 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.89 KiB [emitted] [minimized] (name: main)
|
||||
asset UserApi_js.output.js 532 bytes [emitted] [minimized]
|
||||
asset output.js 2.88 KiB [emitted] [minimized] (name: main)
|
||||
asset UserApi_js.output.js 534 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) UserApi_js.output.js 617 bytes [rendered]
|
||||
> ./UserApi.js ./Actions.js 22:30-52
|
||||
> ./UserApi.js ./Actions.js 2:16-38
|
||||
|
@ -622,9 +622,9 @@ chunk (runtime: main) UserApi_js.output.js 617 bytes [rendered]
|
|||
[exports: createUser]
|
||||
import() ./UserApi.js ./example.js + 1 modules ./Actions.js 2:16-38
|
||||
import() ./UserApi.js ./example.js + 1 modules ./Actions.js 22:30-52
|
||||
chunk (runtime: main) output.js (main) 1.19 KiB (javascript) 7.59 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 1.19 KiB (javascript) 7.57 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 7.59 KiB 9 modules
|
||||
runtime modules 7.57 KiB 9 modules
|
||||
./example.js + 1 modules 1.19 KiB [built] [code generated]
|
||||
[no exports]
|
||||
[no exports used]
|
||||
|
|
|
@ -539,7 +539,10 @@ const msg = "from virtual module with custom scheme";
|
|||
/******/ // "1" is the signal for "already loaded"
|
||||
/******/ if(!installedChunks[chunkId]) {
|
||||
/******/ if(true) { // all chunks have JS
|
||||
/******/ installChunk(require("./" + __webpack_require__.u(chunkId)));
|
||||
/******/ var installedChunk = require("./" + __webpack_require__.u(chunkId));
|
||||
/******/ if (!installedChunks[chunkId]) {
|
||||
/******/ installChunk(installedChunk);
|
||||
/******/ }
|
||||
/******/ } else installedChunks[chunkId] = 1;
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
@ -572,13 +575,13 @@ const msg = "from virtual module with custom scheme";
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 16.3 KiB [emitted] (name: main)
|
||||
asset output.js 16.4 KiB [emitted] (name: main)
|
||||
asset 2.output.js 815 bytes [emitted]
|
||||
asset 1.output.js 814 bytes [emitted]
|
||||
chunk (runtime: main) output.js (main) 1.46 KiB (javascript) 4.13 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 1.46 KiB (javascript) 4.21 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
dependent modules 514 bytes [dependent] 8 modules
|
||||
runtime modules 4.13 KiB 7 modules
|
||||
runtime modules 4.21 KiB 7 modules
|
||||
./example.js 977 bytes [built] [code generated]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
|
@ -601,7 +604,7 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset output.js 2.5 KiB [emitted] [minimized] (name: main)
|
||||
asset output.js 2.52 KiB [emitted] [minimized] (name: main)
|
||||
asset 263.output.js 121 bytes [emitted] [minimized]
|
||||
asset 722.output.js 121 bytes [emitted] [minimized]
|
||||
chunk (runtime: main) 263.output.js 20 bytes [rendered]
|
||||
|
@ -614,10 +617,10 @@ chunk (runtime: main) 722.output.js 20 bytes [rendered]
|
|||
./routes/b.js 20 bytes [built] [code generated]
|
||||
[exports: default]
|
||||
import() ./routes/b.js virtual:routes 2:9-32
|
||||
chunk (runtime: main) output.js (main) 1.46 KiB (javascript) 4.13 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) output.js (main) 1.46 KiB (javascript) 4.21 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
dependent modules 514 bytes [dependent] 8 modules
|
||||
runtime modules 4.13 KiB 7 modules
|
||||
runtime modules 4.21 KiB 7 modules
|
||||
./example.js 977 bytes [built] [code generated]
|
||||
[no exports]
|
||||
[no exports used]
|
||||
|
|
|
@ -30,7 +30,8 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _pkg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pkg */ 1);
|
||||
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_pkg__WEBPACK_IMPORTED_MODULE_0__]);
|
||||
_pkg__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
||||
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
||||
_pkg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
||||
|
||||
|
||||
document.write((0,_pkg__WEBPACK_IMPORTED_MODULE_0__.greeting)('Bob'));
|
||||
|
@ -57,7 +58,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export */ });
|
||||
/* harmony import */ var _hi_wasm_bg_wasm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hi_wasm_bg.wasm */ 2);
|
||||
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_hi_wasm_bg_wasm__WEBPACK_IMPORTED_MODULE_0__]);
|
||||
_hi_wasm_bg_wasm__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
||||
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
||||
_hi_wasm_bg_wasm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
||||
|
||||
|
||||
let WASM_VECTOR_LEN = 0;
|
||||
|
@ -377,7 +379,7 @@ module.exports = __webpack_require__.v(exports, module.id, "ffe21e855d11d22ab54f
|
|||
|
||||
```
|
||||
asset ffe21e855d11d22ab54f.wasm 14.8 KiB [emitted] [immutable] (auxiliary name: main)
|
||||
asset output.js 13.6 KiB [emitted] (name: main)
|
||||
asset output.js 13.7 KiB [emitted] (name: main)
|
||||
chunk (runtime: main) output.js (main) 3.03 KiB (javascript) 14.8 KiB (webassembly) 3.72 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 3.72 KiB 6 modules
|
||||
|
|
|
@ -86,7 +86,8 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _magic_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./magic.js */ 1);
|
||||
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_magic_js__WEBPACK_IMPORTED_MODULE_0__]);
|
||||
_magic_js__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
||||
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
||||
_magic_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
||||
|
||||
|
||||
// accessing memory
|
||||
|
@ -126,7 +127,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export */ });
|
||||
/* harmony import */ var _magic_wat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./magic.wat */ 2);
|
||||
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_magic_wat__WEBPACK_IMPORTED_MODULE_0__]);
|
||||
_magic_wat__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
||||
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
||||
_magic_wat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
||||
// reexporting
|
||||
|
||||
|
||||
|
@ -420,7 +422,7 @@ function getRandomNumber() {
|
|||
## Unoptimized
|
||||
|
||||
```
|
||||
asset output.js 14 KiB [emitted] (name: main)
|
||||
asset output.js 14.1 KiB [emitted] (name: main)
|
||||
asset daa529a2a650ee3943a9.module.wasm 139 bytes [emitted] [immutable] (auxiliary name: main)
|
||||
chunk (runtime: main) output.js (main) 696 bytes (javascript) 139 bytes (webassembly) 3.72 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
|
|
|
@ -254,7 +254,6 @@ export const add = (content, from) => {
|
|||
/******/ script = document.createElement('script');
|
||||
/******/
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.timeout = 120;
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
|
@ -287,7 +286,7 @@ export const add = (content, from) => {
|
|||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.b = document.baseURI || self.location.href;
|
||||
/******/ __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
|
||||
|
@ -747,9 +746,9 @@ chunk (runtime: 9a81d90cfd0dfd13d748) workers/fibonacci.js (fibonacci) 176 bytes
|
|||
./fib-worker.js 176 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
new Worker() ./fib-worker.js ./example.js 80:18-84:2
|
||||
chunk (runtime: main) main.js (main) 2.25 KiB (javascript) 5.41 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) main.js (main) 2.25 KiB (javascript) 5.42 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.41 KiB 7 modules
|
||||
runtime modules 5.42 KiB 7 modules
|
||||
./example.js 2.25 KiB [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
|
@ -759,7 +758,7 @@ webpack X.X.X compiled successfully
|
|||
## Production mode
|
||||
|
||||
```
|
||||
asset main.js 3.27 KiB [emitted] [minimized] (name: main)
|
||||
asset main.js 3.29 KiB [emitted] [minimized] (name: main)
|
||||
asset workers/fibonacci.js 776 bytes [emitted] [minimized] (name: fibonacci)
|
||||
asset chat.js 270 bytes [emitted] [minimized] (name: chat)
|
||||
asset 129.js 159 bytes [emitted] [minimized]
|
||||
|
@ -783,9 +782,9 @@ chunk (runtime: 9a81d90cfd0dfd13d748) workers/fibonacci.js (fibonacci) 176 bytes
|
|||
./fib-worker.js 176 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
new Worker() ./fib-worker.js ./example.js 80:18-84:2
|
||||
chunk (runtime: main) main.js (main) 2.25 KiB (javascript) 5.41 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) main.js (main) 2.25 KiB (javascript) 5.42 KiB (runtime) [entry] [rendered]
|
||||
> ./example.js main
|
||||
runtime modules 5.41 KiB 7 modules
|
||||
runtime modules 5.42 KiB 7 modules
|
||||
./example.js 2.25 KiB [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./example.js main
|
||||
|
|