Skip to content

Commit

Permalink
fix: add missed sideEffects
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepolischuk committed Jun 28, 2024
1 parent 85812ef commit d9e135e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ function modifyWebpackConfig(config) {
module.exports = [
{
name: 'The size of the Mediator with Embed layout',
limit: '10.1 KB',
limit: '9.5 KB',
path: 'dist/index.js',
import: '{createMediator, EmbedLayout}',
modifyWebpackConfig
},
{
name: 'The size of the Mediator with Overlay layout',
limit: '10.2 KB',
limit: '9.7 KB',
path: 'dist/index.js',
import: '{createMediator, OverlayLayout}',
modifyWebpackConfig
},
{
name: 'The size of the Consumer',
limit: '7.3 KB',
limit: '5.3 KB',
path: 'dist/index.js',
import: '{registerIFrame}',
modifyWebpackConfig
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"dist",
"src"
],
"sideEffects": [
"dist/utils/dom/index.js"
],
"scripts": {
"build": "tsc && find src -type f -name \"*.css\" -exec sh -c 'cp \"$1\" \"dist/$(echo \"$1\" | sed \"s|src/||\")\"' _ {} \\;",
"test": "jest",
Expand All @@ -34,7 +37,7 @@
"domready": "^1.0.8",
"lodash.debounce": "^4.0.8",
"lodash.throttle": "^4.1.1",
"magic-transport": "^3.0.1"
"magic-transport": "^3.0.2"
},
"devDependencies": {
"@commitlint/cli": "^19.0.3",
Expand Down
14 changes: 7 additions & 7 deletions src/iframe/consumer-resizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ import {mutationEvents, setMutationParams} from '../utils/dom'
import {EventEmitter} from '../utils/event-emitter'
import type {Size} from '../types'

setMutationParams({
attributes: true,
childList: true,
subtree: true,
characterData: true
})

export class IFrameResizer {
private events: EventEmitter
private transport: Consumer<any, any>
Expand All @@ -19,6 +12,13 @@ export class IFrameResizer {
public constructor(transport: Consumer<any, any>) {
this.events = new EventEmitter()
this.transport = transport

setMutationParams({
attributes: true,
childList: true,
subtree: true,
characterData: true
})
}

public getSize() {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6064,10 +6064,10 @@ lunr@^2.3.9:
resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1"
integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==

magic-transport@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/magic-transport/-/magic-transport-3.0.1.tgz#2434819ac9556686b561573c6924ca03908cfe7c"
integrity sha512-yNt9+l4VIYhlWIcHcWX8g6V6DoH6KRIDGcarILpZnVQreLr5635sN+Wxna0tO08dTbAOE1EFE/+mael35PC1fg==
magic-transport@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/magic-transport/-/magic-transport-3.0.2.tgz#34dd7c756071a0d4112b8d7c6198d4fd6f760fe7"
integrity sha512-qkdiuBK1xFt1NYt0OIjBodH5vUbylSfnkmSCGSRL713ltytm0zqrwfZxXnPNPC2OA4Kkm9Jy6gGFYQsu7KRyzw==
dependencies:
dot-prop "^3.0.0"

Expand Down

0 comments on commit d9e135e

Please sign in to comment.