Skip to content

Commit

Permalink
adapt docs
Browse files Browse the repository at this point in the history
3.4.0-0
  • Loading branch information
lukastaegert committed Nov 18, 2022
1 parent d21e596 commit 0048150
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion browser/package.json
@@ -1,6 +1,6 @@
{
"name": "@rollup/browser",
"version": "3.3.0",
"version": "3.4.0-0",
"description": "Next-generation ES module bundler browser build",
"main": "dist/rollup.browser.js",
"module": "dist/es/rollup.browser.js",
Expand Down
20 changes: 11 additions & 9 deletions docs/999-big-list-of-options.md
Expand Up @@ -1717,20 +1717,22 @@ This can not only help with dead code removal, but can also improve JavaScript c
export default {
treeshake: {
preset: 'smallest',
manualPureFunctions: ['foo', 'bar.baz']
manualPureFunctions: ['styled.div', 'local']
}
// ...
};

// code
import { lib as bar } from 'external';
const foo = console.log;

foo(); // removed
bar.baz(); // removed
bar(); // not removed
bar.quuz(); // not removed
bar?.baz(); // not removed
import styled from 'styled-components';
const local = console.log;

local(); // removed
styled.div`
color: blue;
`; // removed
styled?.div(); // removed
styled(); // not removed
styled.h1(); // not removed
```
**treeshake.moduleSideEffects**<br> Type: `boolean | "no-external" | string[] | (id: string, external: boolean) => boolean`<br> CLI: `--treeshake.moduleSideEffects`/`--no-treeshake.moduleSideEffects`/`--treeshake.moduleSideEffects no-external`<br> Default: `true`
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "rollup",
"version": "3.3.0",
"version": "3.4.0-0",
"description": "Next-generation ES module bundler",
"main": "dist/rollup.js",
"module": "dist/es/rollup.js",
Expand Down

0 comments on commit 0048150

Please sign in to comment.