add callout in bundling for updating the .vscodeignore
This commit is contained in:
Родитель
0dad86df5f
Коммит
e6ba64211f
|
@ -43,6 +43,8 @@ Merge these entries into the `scripts` section in `package.json`:
|
|||
|
||||
The `esbuild` and `esbuild-watch` scripts are for development and they produce the bundle file. The `vscode:prepublish` is used by `vsce`, the VS Code packaging and publishing tool, and run before publishing an extension. Passing the `--minify` flag and no `--sourcemap` compresses the code and creates a small bundle, but also makes debugging hard, so other flags are used during development. To run above scripts, open a terminal and type `npm run esbuild` or select **Tasks: Run Task** from the Command Palette (`kb(workbench.action.showCommands)`).
|
||||
|
||||
Finally, you will want to update your `.vscodeignore` file so that compiled files are included in the published extension. Check out the [Publishing](#Publishing) section for more details.
|
||||
|
||||
Jump down to the [Tests](#tests) section to continue reading.
|
||||
|
||||
## Using webpack
|
||||
|
@ -123,6 +125,8 @@ In the sample above, the following are defined:
|
|||
* The `resolve` and `module/rules` configurations are there to support TypeScript and JavaScript input files.
|
||||
* The `externals` configuration is used to declare exclusions, for example files and modules that should not be included in the bundle. The `vscode` module should not be bundled because it doesn't exist on disk but is created by VS Code on-the-fly when required. Depending on the node modules that an extension uses, more exclusion may be necessary.
|
||||
|
||||
Finally, you will want to update your `.vscodeignore` file so that compiled files are included in the published extension. Check out the [Publishing](#Publishing) section for more details.
|
||||
|
||||
### Run webpack
|
||||
|
||||
With the `webpack.config.js` file created, webpack can be invoked. You can run webpack from the command line but to reduce repetition, using npm scripts is helpful.
|
||||
|
|
Загрузка…
Ссылка в новой задаче