Skip to content

Commit

Permalink
Deprecate namespaceToStringTag in favour of generatedCode.symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Mar 1, 2022
1 parent c5fdd51 commit e2c395b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions docs/999-big-list-of-options.md
Expand Up @@ -593,7 +593,10 @@ const foo = 42;
exports.foo = foo;

// cjs output with symbols: true
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: 'Module' }
});

const foo = 42;

Expand Down Expand Up @@ -1901,8 +1904,7 @@ You can also supply a list of external ids to be considered pure or a function t

#### output.namespaceToStringTag

_Use [`output.generatedCode.symbols`](guide/en/#outputgeneratedcode) instead._<br>
Type: `boolean`<br> CLI: `--namespaceToStringTag`/`--no-namespaceToStringTag`<br> Default: `false`
_Use [`output.generatedCode.symbols`](guide/en/#outputgeneratedcode) instead._<br> Type: `boolean`<br> CLI: `--namespaceToStringTag`/`--no-namespaceToStringTag`<br> Default: `false`

Whether to add spec compliant `.toString()` tags to namespace objects. If this option is set,

Expand Down
Expand Up @@ -2,7 +2,7 @@ module.exports = {
description: 'adds Symbol.toStringTag property to entry chunks with named exports',
options: {
output: {
namespaceToStringTag: true,
generatedCode: { symbols: true },
exports: 'named',
name: 'bundle'
}
Expand Down

0 comments on commit e2c395b

Please sign in to comment.