Skip to content

Conversation

@scott-williams-az
Copy link
Contributor

@scott-williams-az scott-williams-az requested a review from a team as a code owner April 10, 2025 19:17
@asu-jenkins-devops
Copy link
Collaborator

Copy link
Contributor

@davidornelas11 davidornelas11 left a comment

Choose a reason for hiding this comment

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

Looks good. Just a few things I noticed

resolve(__dirname, "src/js/global-header.js"),
resolve(__dirname, "src/js/data-layer.js"),
resolve(__dirname, "../../node_modules/bootstrap/js/index.esm.js"),
// resolve(__dirname, "../../node_modules/bootstrap/js/index.esm.js"),
Copy link
Contributor

Choose a reason for hiding this comment

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

This can just be removed since we just copy the bootstrap umd over now.

Comment on lines 71 to 73
if (chunkInfo.name.includes("index.esm")) {
return "js/bootstrap.bundle.min.[format]";
return "js/[format]/bootstrap.bundle.min.js";
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This can also be removed now since the copy-bootstrap-umd-to-dist plugin up top already moves the bootstrap umd over to the dist file. This just overwrites that anyways

"module": "./src/js/storybook-data-layer.js",
"default": "./src/js/data-layer.js"
},
"./*": "./*",
Copy link
Contributor

Choose a reason for hiding this comment

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

We just have to make sure we update our README to provide any info needed for imprting certain files

*/
cardLink: PropTypes.string,
};

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice job removing the default props on these. I think there is a ticket for this so we might be able to close that too. I will check


import pkg from "./package.json";
/** @typedef {import('vite').UserConfig} UserConfig */
import baseConfig from "./vite.config.js";
Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea reusing the build config

plugins: [
{
name: "copy",
writeBundle() {
Copy link
Contributor

Choose a reason for hiding this comment

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

One small caveat here is that this runs 3 times, one for each format. The closeBundle hook only runs once after the entire build process runs. This is not an issue in local but in the CI that might be underpowered and doing this dozens of times, it might add up. I console logged the time it takes to process and its a difference of 500-800ms for closeBundle vs 2-4 seconds for writeBundle. Might be different on Jenkins. Screenshot is only how many times it runs
Screenshot 2025-04-24 at 2 43 47 PM
Screenshot 2025-04-24 at 2 44 14 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

If we were doing anything with the build itself then we would have to call bundle.close() but we should be fine not needing to call it

@davidornelas11 davidornelas11 dismissed their stale review April 24, 2025 23:41

Changes made

@davidornelas11 davidornelas11 merged commit 2f2a702 into dev Apr 24, 2025
1 check passed
@davidornelas11 davidornelas11 deleted the uds-1958 branch April 24, 2025 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants