Skip to content

Commit 7b04369

Browse files
committed
fix: fix production build
1 parent b8bb4aa commit 7b04369

File tree

6 files changed

+37
-50
lines changed

6 files changed

+37
-50
lines changed

dist/index.d.ts

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,14 @@
11
/// <reference types="react" />
2-
import * as React from "react";
3-
4-
export enum Interaction {
5-
None = "NONE",
6-
Hover = "HOVER",
7-
Active = "ACTIVE",
8-
Resize = "RESIZE",
9-
}
10-
112
export interface ILayeredImageProps extends React.HTMLProps<HTMLDivElement> {
12-
layers: Array<string>;
13-
aspectRatio: number;
14-
borderRadius?: React.CSSProperties["borderRadius"];
15-
transitionDuration?: React.CSSProperties["transitionDuration"];
16-
transitionTimingFunction?: React.CSSProperties["transitionTimingFunction"];
17-
lightColor?: React.CSSProperties["color"];
18-
lightOpacity?: React.CSSProperties["opacity"];
19-
shadowColor?: React.CSSProperties["color"];
20-
shadowOpacity?: React.CSSProperties["opacity"];
21-
}
22-
23-
export interface ILayeredImageState {
24-
width?: React.CSSProperties["width"];
25-
height?: React.CSSProperties["height"];
26-
interaction: Interaction;
27-
loaded: number;
28-
error: number;
29-
}
30-
31-
export default class LayeredImage extends React.Component<ILayeredImageProps, ILayeredImageState> {
32-
static defaultProps: Partial<ILayeredImageProps>;
33-
state: ILayeredImageState;
34-
private elements;
35-
private refHandlers;
36-
private images;
37-
render(): JSX.Element;
38-
componentDidMount(): void;
39-
componentWillReceiveProps(nextProps: ILayeredImageProps): void;
40-
componentWillUnmount(): void;
41-
private handleMouseInteraction;
42-
private handleTouchInteraction;
43-
private handleInteractionEnd;
44-
private handleWindowResize;
45-
private getDimensions;
46-
private computeStyles;
47-
private applyStyles;
48-
}
3+
layers: Array<string>
4+
aspectRatio?: number
5+
borderRadius?: React.CSSProperties["borderRadius"]
6+
transitionDuration?: number
7+
transitionTimingFunction?: React.CSSProperties["transitionTimingFunction"]
8+
lightColor?: React.CSSProperties["color"]
9+
lightOpacity?: React.CSSProperties["opacity"]
10+
shadowColor?: React.CSSProperties["color"]
11+
shadowOpacity?: React.CSSProperties["opacity"]
12+
}
13+
export declare const LayeredImage: React.FC<ILayeredImageProps>
14+
export default LayeredImage

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"semantic-release": "^17.1.1",
5656
"ts-loader": "^8.0.3",
5757
"typescript": "^4.0.2",
58+
"uglifyjs-webpack-plugin": "^2.2.0",
5859
"webpack": "^4.44.1",
5960
"webpack-cli": "^3.3.12",
6061
"webpack-dev-server": "^3.11.0"

webpack.prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
react: "react",
2222
},
2323
plugins: [
24-
new CleanWebpackPlugin(["dist"]),
24+
new CleanWebpackPlugin(),
2525
new CopyWebpackPlugin({
2626
patterns: [
2727
{

yarn.lock

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7282,6 +7282,11 @@ [email protected]:
72827282
range-parser "~1.2.1"
72837283
statuses "~1.5.0"
72847284

7285+
serialize-javascript@^1.7.0:
7286+
version "1.9.1"
7287+
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.9.1.tgz#cfc200aef77b600c47da9bb8149c943e798c2fdb"
7288+
integrity sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==
7289+
72857290
serialize-javascript@^4.0.0:
72867291
version "4.0.0"
72877292
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa"
@@ -8246,11 +8251,26 @@ typescript@^4.0.2:
82468251
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
82478252
integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
82488253

8249-
uglify-js@^3.1.4:
8254+
uglify-js@^3.1.4, uglify-js@^3.6.0:
82508255
version "3.10.4"
82518256
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.4.tgz#dd680f5687bc0d7a93b14a3482d16db6eba2bfbb"
82528257
integrity sha512-kBFT3U4Dcj4/pJ52vfjCSfyLyvG9VYYuGYPmrPvAxRw/i7xHiT4VvCev+uiEMcEEiu6UNB6KgWmGtSUYIWScbw==
82538258

8259+
uglifyjs-webpack-plugin@^2.2.0:
8260+
version "2.2.0"
8261+
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.2.0.tgz#e75bc80e7f1937f725954c9b4c5a1e967ea9d0d7"
8262+
integrity sha512-mHSkufBmBuJ+KHQhv5H0MXijtsoA1lynJt1lXOaotja8/I0pR4L9oGaPIZw+bQBOFittXZg9OC1sXSGO9D9ZYg==
8263+
dependencies:
8264+
cacache "^12.0.2"
8265+
find-cache-dir "^2.1.0"
8266+
is-wsl "^1.1.0"
8267+
schema-utils "^1.0.0"
8268+
serialize-javascript "^1.7.0"
8269+
source-map "^0.6.1"
8270+
uglify-js "^3.6.0"
8271+
webpack-sources "^1.4.0"
8272+
worker-farm "^1.7.0"
8273+
82548274
82558275
version "0.0.6"
82568276
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"

0 commit comments

Comments
 (0)