Skip to content

Commit

Permalink
Update docs, bundler config
Browse files Browse the repository at this point in the history
  • Loading branch information
101arrowz committed Dec 21, 2020
1 parent 06d5548 commit 4dd2988
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/recipes/optimize-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ rrweb.record({

### Use packFn to compress every event

rrweb provides a pako-based simple compress function rrweb.pack.
rrweb provides an fflate-based simple compress function rrweb.pack.

You can use it by passing it as the `packFn` in the recording.

Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/optimize-storage.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ rrweb.record({

### 基于 packFn 的单数据压缩

rrweb 内包含了基于 pako 的简单压缩 rrweb.pack,在录制时可以作为 `packFn` 传入。
rrweb 内包含了基于 fflate 的简单压缩 rrweb.pack,在录制时可以作为 `packFn` 传入。

```js
rrweb.record({
Expand Down
12 changes: 1 addition & 11 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import typescript from 'rollup-plugin-typescript';
import commonjs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
import postcss from 'rollup-plugin-postcss';
Expand Down Expand Up @@ -37,12 +36,6 @@ function toMinPath(path) {
return path.replace(/\.js$/, '.min.js');
}

const namedExports = {
'pako/dist/pako_deflate': ['deflate'],
'pako/dist/pako_inflate': ['inflate'],
pako: ['deflate'],
};

const baseConfigs = [
// record only
{
Expand Down Expand Up @@ -85,7 +78,7 @@ const baseConfigs = [
let configs = [];

for (const c of baseConfigs) {
const basePlugins = [resolve(), commonjs({ namedExports }), typescript()];
const basePlugins = [resolve({ browser: true }), typescript()];
const plugins = basePlugins.concat(
postcss({
extract: false,
Expand Down Expand Up @@ -154,9 +147,6 @@ if (process.env.BROWSER_ONLY) {
input: './src/index.ts',
plugins: [
resolve(),
commonjs({
namedExports,
}),
typescript(),
postcss({
extract: true,
Expand Down
12 changes: 0 additions & 12 deletions src/declarations/pako/index.d.ts

This file was deleted.

0 comments on commit 4dd2988

Please sign in to comment.