Skip to content

Commit

Permalink
feat: add bundlesize tracking test (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonkberg committed Oct 12, 2018
1 parent ddd97a5 commit 3b84dc6
Show file tree
Hide file tree
Showing 4 changed files with 382 additions and 18 deletions.
9 changes: 9 additions & 0 deletions .circleci/config.yml
Expand Up @@ -25,10 +25,19 @@ jobs:

- run: yarn build

- run: yarn bundlesize

- store_artifacts:
path: .next/report.html
destination: client/report.html

- store_artifacts:
path: .next/server/report.html
destination: server/report.html

workflows:
version: 2
workflow:
jobs:
- build:
context: org-global
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,7 +1,7 @@
FROM mhart/alpine-node:10 as base
WORKDIR /app
ENV YARN_VERSION 1.10.1
RUN apk add --no-cache curl
RUN apk add --no-cache curl make gcc g++ python
RUN curl -o- -L https://yarnpkg.com/install.sh | sh -s -- --version $YARN_VERSION
ENV PATH="/root/.yarn/bin:/root/.config/yarn/global/node_modules/.bin:$PATH"
COPY package.json yarn.lock ./
Expand Down
15 changes: 15 additions & 0 deletions package.json
Expand Up @@ -34,6 +34,20 @@
"git add"
]
},
"bundlesize": [
{
"path": ".next/static/chunks/*.js",
"maxSize": "100 kB"
},
{
"path": ".next/static/runtime/*.js",
"maxSize": "10 kB"
},
{
"path": ".next/static/*/pages/*.js",
"maxSize": "30 kB"
}
],
"dependencies": {
"@slack/client": "4.8.0",
"apollo-cache-inmemory": "1.3.5",
Expand Down Expand Up @@ -87,6 +101,7 @@
"babel-core": "7.0.0-bridge.0",
"babel-jest": "23.6.0",
"babel-plugin-emotion": "9.2.11",
"bundlesize": "0.17.0",
"chokidar": "2.0.4",
"eslint": "5.6.1",
"file-loader": "2.0.0",
Expand Down

1 comment on commit 3b84dc6

@vercel
Copy link

@vercel vercel bot commented on 3b84dc6 Oct 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.