> For the complete documentation index, see [llms.txt](https://notes.lirenxn.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.lirenxn.com/2020/wk-notes-02-11-gradual-rollout-webpack-vscode-auto-import.md).

# Wk-notes-02-11-Gradual-rollout-webpack-vscode-auto-import

### Gradual rollout

When rollout new feature, it's a good time to address(exaggerate) problems of old/legacy system, and push the team/delivery for the system change.

Think about all the RAID, rick, stakeholder, dependency. What other teams are doing, what could they do, what's the potential issue and reverse strategy, what polyfill to have for legacy system/code.

### Webpack

**Caching**

Being a web-awared tool, webpack always focus on working well with browser, including browser caching policy.

Browser will tend to cache file with same file name, or with the correct `If-Modifie-Since` HTTP header set up, it will decide using cache or refetch.

To enforce browser refetch any latest update, webpack recommends using `[contentHash].js` as resource name, in which case, the file name will be changed as the content change, and browser will always treat the new name as new resource.

#### Vscode <a href="#vscode" id="vscode"></a>

Advanced intellisense for js/ts is enabled over ts-v2.5. It is powered by **ts-server**. To make it work, `ts-check` for `*.js` should be toggled on.

**Explicitly**

* add `// @ts-check` to `.js` file
* add `tsconfig.json` with `allowJs: true, checkJs: true`
* add `jsconfig.json` with `checkJs: true`

**Implicitly**

* vscode -> setting -> **JavaScript › Implicit Project Config: Check JS**
