-
Notifications
You must be signed in to change notification settings - Fork 151
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
Use preconstruct for building releases #24
Use preconstruct for building releases #24
Conversation
429b4b4
to
a9265bd
Compare
Interesting, thanks for taking out the time to do all the research and give us options to choose from! I'm looking at a |
@Dhaiwat10 that's a very good question. Right now, the contents of 'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./web3-ui.cjs.prod.js");
} else {
module.exports = require("./web3-ui.cjs.dev.js");
} however, the prod and dev versions are both identical. according to the preconstruct docs:
I'm not really sure why all this exists though. Maybe @with-heart could illuminate |
package.json
Outdated
"build": "yarn clean; preconstruct build; cp LICENSE package.json README.md ./dist", | ||
"clean": "rimraf dist", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"build": "yarn clean; preconstruct build; cp LICENSE package.json README.md ./dist", | |
"clean": "rimraf dist", | |
"build": "preconstruct build", |
preconstruct
cleans as part of its internal process. We also don't need to copy anything into dist
, we can just include LICENSE
and README.md
later as part of the published module using the files
key (package.json
is always included).
No idea about dev vs. prod files. Not a feature I've needed to use before so not sure what it does. |
When we switch this over to support the monorepo, we'll want to add a script:
This creates files in imo that's one of the killer features of |
a9265bd
to
8bdb243
Compare
@with-heart this is now rebased on top of the monorepo work, and thus is ready for another review. The one issue I had was trying to build packages using a shared babel config from the root of the repo. I got the below error, and couldn't figure out how to resolve it, so i figured i'd just keep around the package level build commands for now. maybe we can fix this in the future, but this should be good to go otherwise. |
8bdb243
to
5570a48
Compare
5570a48
to
506ca11
Compare
i'm going to merge this so that development is easier (no need to keep running |
This PR is an alternate to #23 where we use preconstruct for building the release. This entails:
I'll keep these both open, so that folks can see the two options and pick whichever one makes the most sense for the project
New
./dist
output:to: @Dhaiwat10 @crondinini @with-heart