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

fix: error when entry doesn't exist #455

Merged
merged 1 commit into from
Feb 13, 2022
Merged

Conversation

threepointone
Copy link
Contributor

@threepointone threepointone commented Feb 12, 2022

This adds an error when we use an entry point that doesn't exist, either for wrangler dev or wrangler publish, and either via cli arg or build.upload.main in wrangler.toml. By using a common abstraction for dev and publish, This also adds support for using build.config.main/build.config.dir for wrangler dev.

@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2022

🦋 Changeset detected

Latest commit: 04dd7d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2022

wrangler prerelease is available for testing:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/1837915405/wrangler

@petebacondarwin petebacondarwin added this to the 2.0 milestone Feb 13, 2022
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Generally LGTM - thanks for the clean up. Left a few suggestions/questionds.
The next step is to fully deprecate build.upload and encourage the "new" way of entry/main top level config field.

packages/wrangler/src/config.ts Show resolved Hide resolved
packages/wrangler/src/config.ts Outdated Show resolved Hide resolved
packages/wrangler/src/dev.tsx Outdated Show resolved Hide resolved
packages/wrangler/src/bundle.ts Show resolved Hide resolved
packages/wrangler/src/index.tsx Outdated Show resolved Hide resolved
This adds an error when we use an entry point that doesn't exist, either for `wrangler dev` or `wrangler publish`, and either via cli arg or `build.upload.main` in `wrangler.toml`. By using a common abstraction for `dev` and `publish`, This also adds support for using `build.config.main`/`build.config.dir` for `wrangler dev`.

- Fixes #418
- Fixes #390
@threepointone
Copy link
Contributor Author

I polished it a bit more, looks good imo, landing this.

@threepointone threepointone merged commit 80aa106 into main Feb 13, 2022
@threepointone threepointone deleted the missing-entry-custom-error branch February 13, 2022 20:41
@github-actions github-actions bot mentioned this pull request Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants