Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic bundle analysis for dev builds #1673

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codesandbox/mekko/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Nebula mashup</title>
Expand Down
2 changes: 1 addition & 1 deletion .codesandbox/mekko/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
"@babel/core": "7.26.7",
"parcel": "^2.13.3"
}
}
}
2 changes: 1 addition & 1 deletion apis/stardust/api-spec/listbox-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion apis/stardust/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
"react": "^17.0.2 || ^18.1.0",
"react-dom": "^17.0.2 || ^18.1.0"
}
}
}
8 changes: 8 additions & 0 deletions commands/build/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const commonjs = require('@rollup/plugin-commonjs');
const terser = require('@rollup/plugin-terser');
const jsxPlugin = require('@babel/plugin-transform-react-jsx');
const babelPreset = require('@babel/preset-env');
const { visualizer } = require('rollup-plugin-visualizer');

const resolveNative = require('./resolveNative');

Expand Down Expand Up @@ -195,6 +196,13 @@ const config = ({
})
: false,
],
...[
mode === 'development'
? visualizer({
filename: 'bundle-analysis.html',
})
: false,
],
].filter(Boolean),
},
output: output(),
Expand Down
1 change: 1 addition & 0 deletions commands/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"postcss": "^8.5.1",
"rollup": "4.32.0",
"rollup-plugin-postcss": "4.0.2",
"rollup-plugin-visualizer": "5.14.0",
"yargs": "17.7.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion commands/create/templates/mashup/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
7 changes: 5 additions & 2 deletions commands/serve/web/eRender.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -24,7 +24,10 @@

body {
background: linear-gradient(110deg, #92498f 0%, #45b3b2 100%);
font: normal 14px/16px 'Source Sans Pro', Arial, sans-serif;
font:
normal 14px/16px 'Source Sans Pro',
Arial,
sans-serif;
-webkit-font-smoothing: antialiased;
}

Expand Down
7 changes: 5 additions & 2 deletions commands/serve/web/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -20,7 +20,10 @@

body {
color: #404040;
font: normal 14px/16px 'Source Sans Pro', Arial, sans-serif;
font:
normal 14px/16px 'Source Sans Pro',
Arial,
sans-serif;
-webkit-font-smoothing: antialiased;
background: linear-gradient(110deg, #91298c 0%, #45b3b2 100%);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/chart-conversion/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/dev-mashup/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/mashup/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/sn-hello-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
"react": "18.2.0",
"react-dom": "18.2.0"
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@
"test/component/*"
],
"packageManager": "yarn@1.22.22"
}
}
4 changes: 2 additions & 2 deletions test/fixtures/viz/listbox/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export default function v() {
cell.qState === 'S' || cell.qState === 'L'
? STATES.S.background
: cell.qState === 'A'
? STATES.A.background
: 'none'
? STATES.A.background
: 'none'
}">${cell.qText}</td>`
)
.join('')}</tr>`
Expand Down
2 changes: 1 addition & 1 deletion test/mashup/listbox/listbox.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion test/mashup/visualize/life.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion test/rendering/listbox/listbox.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion test/rendering/sheet/sheet.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion test/rendering/snaps/single.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion test/rendering/snaps/snapper.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
17 changes: 16 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15298,6 +15298,16 @@ rollup-plugin-sass@1.15.2:
resolve "^1.5.0"
sass "^1.7.2"

rollup-plugin-visualizer@5.14.0:
version "5.14.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.14.0.tgz#be82d43fb3c644e396e2d50ac8a53d354022d57c"
integrity sha512-VlDXneTDaKsHIw8yzJAFWtrzguoJ/LnQ+lMpoVfYJ3jJF4Ihe5oYLAqLklIK/35lgUY+1yEzCkHyZ1j4A5w5fA==
dependencies:
open "^8.4.0"
picomatch "^4.0.2"
source-map "^0.7.4"
yargs "^17.5.1"

rollup-pluginutils@^2.8.2:
version "2.8.2"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
Expand Down Expand Up @@ -16065,6 +16075,11 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==

source-map@^0.7.4:
version "0.7.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656"
integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==

spawn-wrap@^1.4.2:
version "1.4.3"
resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.3.tgz#81b7670e170cca247d80bf5faf0cfb713bdcf848"
Expand Down Expand Up @@ -18083,7 +18098,7 @@ yargs@14.2.2:
y18n "^4.0.0"
yargs-parser "^15.0.0"

yargs@17.7.2, yargs@^17.7.2:
yargs@17.7.2, yargs@^17.5.1, yargs@^17.7.2:
version "17.7.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
Expand Down