Skip to content

Commit

Permalink
docs(config): update default values for sourcemaps and type gen (#899)
Browse files Browse the repository at this point in the history
this commit updates the documentation to coincide with the changes made
in stenciljs/core@7241968
(stenciljs/core#3502). specifically, it updates the
documentation to denote:
- source maps will be generated by default
- types for the `dist-custom-elements` output target will be generated by
default
  • Loading branch information
tanner-reits authored and rwaskiewicz committed Jan 25, 2023
1 parent a1e5bbe commit fee3f13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
9 changes: 4 additions & 5 deletions versioned_docs/version-v2/config/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,13 @@ Will generate the following comment:

## sourceMap

*default: `false`*
*default: `true`*

When set to `true`, sourcemaps will be generated for a project.
When omitted or set to `true`, sourcemaps will be generated for a project.
When set to `false`, sourcemaps will not be generated.

```tsx
sourceMap: true
sourceMap: true | false
```

Sourcemaps create a translation between Stencil components that are written in TypeScript/JSX and the resulting
Expand All @@ -213,8 +214,6 @@ compared to the minified result produced when `sourceMap` is not enabled.
Developers are responsible for determining whether or not they choose to serve sourcemaps in each environment their
components are served and implementing their decision accordingly.

When omitted or set to `false`, sourcemaps will not be generated.

## srcDir

*default: `src`*
Expand Down
16 changes: 5 additions & 11 deletions versioned_docs/version-v2/output-targets/custom-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ will also automatically recursively define any child components as well.
This flag defaults to `false` when omitted from a Stencil configuration file.

:::note
At this time, components created not using JSX may not be automatically
defined. This is a known limitation of the API and users should be aware of
At this time, components that do not use JSX cannot be automatically
defined. This is a known limitation of Stencil that users should be aware of.
it
:::

Expand All @@ -84,17 +84,11 @@ This flag defaults to `true` when omitted from a Stencil configuration file.

### generateTypeDeclarations

By default, type declaration files (`.d.ts` files) are only generated for the `dist-custom-elements` output target when
the [`dist` output target](/distribution) is also declared in a Stencil project's configuration. This behavior
isn't always desirable, as not all users need the files emitted by the `dist` output target. To generate type
declaration files for the `dist-custom-elements`, the experimental `generateTypeDeclarations` field can be set to
`true`.
By default, Stencil will generate type declaration files (`.d.ts` files) as a part of the `dist-custom-elements` output target through the `generateTypeDeclarations` field on the target options. Type declaration files will be placed in the `dist/types` directory in the root of a Stencil project. At this time, this output destination is not able to be configured.

Setting this flag to `true` will generate type declaration files for the `dist-custom-elements` output target. Type
declaration files will be placed in the `dist/types` directory in the root of a Stencil project. At this time, this
output destination is not able to be configured.
Setting this flag to `false` will not generate type declaration files for the `dist-custom-elements` output target.

This flag defaults to `false` when omitted from a Stencil configuration file.
This flag defaults to `true` when omitted from a Stencil configuration file.

## Making Assets Available

Expand Down

0 comments on commit fee3f13

Please sign in to comment.