├── .circleci └── config.yml ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .github ├── CODEOWNERS ├── CONTRIBUTING-OLD.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── BUG.md │ ├── DOCS.md │ ├── FEATURE.md │ ├── MODIFICATION.md │ └── SUPPORT.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── client └── .gitkeep ├── codecov.yml ├── commitlint.config.js ├── docs ├── REMOTE.md └── WEBSOCKETS.md ├── lib ├── HotClientError.js ├── client │ ├── .babelrc │ ├── .eslintrc │ ├── hot.js │ ├── index.js │ ├── log.js │ └── socket.js ├── compiler.js ├── index.js ├── options.js └── socket-server.js ├── package-lock.json ├── package.json ├── schemas └── options.json └── test ├── __snapshots__ ├── compiler.test.js.snap ├── index.test.js.snap ├── options.test.js.snap └── socket-server.test.js.snap ├── compiler.test.js ├── fixtures ├── app-clean.js ├── app.js ├── component.js ├── foo.js ├── index.html ├── multi │ ├── client.js │ ├── server.js │ └── webpack.config.js ├── sub │ └── resource.html ├── test-cert.pfx ├── webpack.config-allentries.js ├── webpack.config-array.js ├── webpack.config-function-invalid.js ├── webpack.config-function.js ├── webpack.config-invalid-object.js ├── webpack.config-invalid-plugin.js ├── webpack.config-invalid.js ├── webpack.config-object.js └── webpack.config-watch.js ├── index.test.js ├── options.test.js ├── socket-server.test.js └── watch.test.js /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | unit_tests: &unit_tests 2 | steps: 3 | - checkout 4 | - restore_cache: 5 | key: dependency-cache-{{ checksum "package-lock.json" }} 6 | - run: 7 | name: NPM Rebuild 8 | command: npm install 9 | - run: 10 | name: Run unit tests. 11 | command: npm run ci:test 12 | canary_tests: &canary_tests 13 | steps: 14 | - checkout 15 | - restore_cache: 16 | key: dependency-cache-{{ checksum "package-lock.json" }} 17 | - run: 18 | name: NPM Rebuild 19 | command: npm install 20 | - run: 21 | name: Install Webpack Canary 22 | command: npm i --no-save webpack@next 23 | - run: 24 | name: Run unit tests. 25 | command: if [[ $(compver --name webpack --gte next --lt latest) < 1 ]] ; then printf "Next is older than Latest - Skipping Canary Suite"; else npm run ci:test ; fi 26 | 27 | version: 2 28 | jobs: 29 | dependency_cache: 30 | docker: 31 | - image: webpackcontrib/circleci-node-base:latest 32 | steps: 33 | - checkout 34 | - restore_cache: 35 | key: dependency-cache-{{ checksum "package-lock.json" }} 36 | - run: 37 | name: Install Dependencies 38 | command: npm install 39 | - save_cache: 40 | key: dependency-cache-{{ checksum "package-lock.json" }} 41 | paths: 42 | - ./node_modules 43 | 44 | node8-latest: 45 | docker: 46 | - image: webpackcontrib/circleci-node8:latest 47 | steps: 48 | - checkout 49 | - restore_cache: 50 | key: dependency-cache-{{ checksum "package-lock.json" }} 51 | - run: 52 | name: NPM Rebuild 53 | command: npm install 54 | - run: 55 | name: Run unit tests. 56 | command: npm run ci:coverage 57 | - run: 58 | name: Submit coverage data to codecov. 59 | command: bash <(curl -s https://codecov.io/bash) 60 | when: on_success 61 | node6-latest: 62 | docker: 63 | - image: webpackcontrib/circleci-node6:latest 64 | <<: *unit_tests 65 | node10-latest: 66 | docker: 67 | - image: webpackcontrib/circleci-node10:latest 68 | <<: *unit_tests 69 | node8-canary: 70 | docker: 71 | - image: webpackcontrib/circleci-node8:latest 72 | <<: *canary_tests 73 | analysis: 74 | docker: 75 | - image: webpackcontrib/circleci-node-base:latest 76 | steps: 77 | - checkout 78 | - restore_cache: 79 | key: dependency-cache-{{ checksum "package-lock.json" }} 80 | - run: 81 | name: NPM Rebuild 82 | command: npm install 83 | - run: 84 | name: Run linting. 85 | command: npm run lint 86 | - run: 87 | name: Run NSP Security Check. 88 | command: npm run security 89 | - run: 90 | name: Validate Commit Messages 91 | command: npm run ci:lint:commits 92 | publish: 93 | docker: 94 | - image: webpackcontrib/circleci-node-base:latest 95 | steps: 96 | - checkout 97 | - restore_cache: 98 | key: dependency-cache-{{ checksum "package-lock.json" }} 99 | - run: 100 | name: NPM Rebuild 101 | command: npm install 102 | # - run: 103 | # name: Validate Commit Messages 104 | # command: npm run release:validate 105 | - run: 106 | name: Publish to NPM 107 | command: printf "noop running conventional-github-releaser" 108 | 109 | version: 2.0 110 | workflows: 111 | version: 2 112 | validate-publish: 113 | jobs: 114 | - dependency_cache 115 | - node6-latest: 116 | requires: 117 | - dependency_cache 118 | filters: 119 | tags: 120 | only: /.*/ 121 | - analysis: 122 | requires: 123 | - dependency_cache 124 | filters: 125 | tags: 126 | only: /.*/ 127 | - node8-latest: 128 | requires: 129 | - analysis 130 | - node6-latest 131 | filters: 132 | tags: 133 | only: /.*/ 134 | - node10-latest: 135 | requires: 136 | - analysis 137 | - node6-latest 138 | filters: 139 | tags: 140 | only: /.*/ 141 | - node8-canary: 142 | requires: 143 | - analysis 144 | - node6-latest 145 | filters: 146 | tags: 147 | only: /.*/ 148 | - publish: 149 | requires: 150 | - node8-latest 151 | - node8-canary 152 | - node10-latest 153 | filters: 154 | branches: 155 | only: 156 | - master -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | insert_final_newline = false 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | example/* 3 | example/node_modules/* 4 | coverage/* 5 | /client 6 | output.js 7 | /node_modules 8 | /dist 9 | /test-old 10 | *.snap 11 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | plugins: ['prettier'], 4 | extends: ['@webpack-contrib/eslint-config-webpack'], 5 | rules: { 6 | 'prettier/prettier': [ 7 | 'error', 8 | { singleQuote: true, trailingComma: 'es5', arrowParens: 'always' }, 9 | ], 10 | }, 11 | }; -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | package-lock.json -diff 2 | * text=auto 3 | bin/* eol=lf 4 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These are the default owners for everything in 2 | # webpack-contrib 3 | @webpack-contrib/org-maintainers 4 | 5 | # Add repository specific users / groups 6 | # below here for libs that are not maintained by the org. -------------------------------------------------------------------------------- /.github/CONTRIBUTING-OLD.md: -------------------------------------------------------------------------------- 1 | # Welcome! 2 | :heart: Thanks for your interest and time in contributing to this project. 3 | 4 | ## What We Use 5 | 6 | - Building: [Webpack](https://webpack.js.org) 7 | - Linting: [ESLint](http://eslint.org/) 8 | - NPM: [NPM as a Build Tool](https://css-tricks.com/using-npm-build-tool/) 9 | - Testing: [Mocha](https://mochajs.org) 10 | 11 | ## Forking and Cloning 12 | 13 | You'll need to first fork this repository, and then clone it locally before you 14 | can submit a Pull Request with your proposed changes. 15 | 16 | Please see the following articles for help getting started with git: 17 | 18 | [Forking a Repository](https://help.github.com/articles/fork-a-repo/) 19 | [Cloning a Repository](https://help.github.com/articles/cloning-a-repository/) 20 | 21 | ## Pull Requests 22 | 23 | Please lint and test your changes before submitting a Pull Request. You can lint your 24 | changes by running: 25 | 26 | ```console 27 | $ npm run lint 28 | ``` 29 | 30 | You can test your changes against the test suite for this module by running: 31 | 32 | ```console 33 | $ npm run test 34 | ``` 35 | 36 | _Note: Please avoid committing `package-lock.json` files!_ 37 | 38 | Please don't change variable or parameter names to match your personal 39 | preferences, unless the change is part of a refactor or significant modification 40 | of the codebase (which is very rare). 41 | 42 | Please remember to thoroughly explain your Pull Request if it doesn't have an 43 | associated issue. If you're changing code significantly, please remember to add 44 | inline or block comments in the code as appropriate. 45 | 46 | ## Testing Your Pull Request 47 | 48 | You may have the need to test your changes in a real-world project or dependent 49 | module. Thankfully, Github provides a means to do this. Add a dependency to the 50 | `package.json` for such a project as follows: 51 | 52 | ```json 53 | "webpack-hot-client": "webpack-contrib/webpack-hot-client#{id}/head" 54 | ``` 55 | 56 | Where `{id}` is the # ID of your Pull Request. 57 | 58 | ## Thanks 59 | 60 | For your interest, time, understanding, and for following this simple guide. 61 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing in @webpack-contrib 2 | 3 | We'd always love contributions to further improve the webpack / webpack-contrib ecosystem! 4 | Here are the guidelines we'd like you to follow: 5 | 6 | * [Questions and Problems](#question) 7 | * [Issues and Bugs](#issue) 8 | * [Feature Requests](#feature) 9 | * [Pull Request Submission Guidelines](#submit-pr) 10 | * [Commit Message Conventions](#commit) 11 | 12 | ### Got a Question or Problem? 13 | 14 | Please submit support requests and questions to StackOverflow using the tag [[webpack]](http://stackoverflow.com/tags/webpack). 15 | StackOverflow is better suited for this kind of support though you may also inquire in [Webpack Gitter](https://gitter.im/webpack/webpack). 16 | The issue tracker is for bug reports and feature discussions. 17 | 18 | ### Found an Issue or Bug? 19 | 20 | Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available. 21 | 22 | We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we ask that you to provide a minimal reproduction scenario (github repo or failing test case). Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like: 23 | 24 | - version of Webpack used 25 | - version of the loader / plugin you are creating a bug report for 26 | - the use-case that fails 27 | 28 | A minimal reproduce scenario allows us to quickly confirm a bug (or point out config problems) as well as confirm that we are fixing the right problem. 29 | 30 | We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it. 31 | 32 | Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced. 33 | 34 | ### Feature Requests? 35 | 36 | You can *request* a new feature by creating an issue on Github. 37 | 38 | If you would like to *implement* a new feature, please submit an issue with a proposal for your work `first`, to be sure that particular makes sense for the project. 39 | 40 | ### Pull Request Submission Guidelines 41 | 42 | Before you submit your Pull Request (PR) consider the following guidelines: 43 | 44 | - Search Github for an open or closed PR that relates to your submission. You don't want to duplicate effort. 45 | - Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages. 46 | - Fill out our `Pull Request Template`. Your pull request will not be considered if it is ignored. 47 | - Please sign the `Contributor License Agreement (CLA)` when a pull request is opened. We cannot accept your pull request without this. Make sure you sign with the primary email address associated with your local / github account. 48 | 49 | ### Webpack Contrib Commit Conventions 50 | 51 | Each commit message consists of a **header**, a **body** and a **footer**. The header has a special 52 | format that includes a **type**, a **scope** and a **subject**: 53 | 54 | ``` 55 | (): 56 | 57 | 58 | 59 |