Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Request: Set JavaScript path by wrangler.toml or CLI #1275

Closed
jahredhope opened this issue May 12, 2020 · 6 comments · Fixed by #1677
Closed

Request: Set JavaScript path by wrangler.toml or CLI #1275

jahredhope opened this issue May 12, 2020 · 6 comments · Fixed by #1677
Labels
feature Feature requests and suggestions timed out

Comments

@jahredhope
Copy link

💡 Feature request

Wrangler has been awesome to get to work with so thanks for all the hard work. I'd like to please raise a feature request that would help with my use-case.

Overview and problem statement

I'm attempting to incrementally adopt wrangler for uploading a worker and related KV storage.
I've already got a (perhaps over-complicated) build process so for now I just want wrangler to upload the file. (After doing a bunch of KV stuff)
I'm able to do this using type="javascript" which is great, but this requires me to modify the package.json main attribute.
Unfortunatly modifying this attribute breaks other things in my project.

Basic example

I'd like to be able to specify the path to find the single JavaScript file by either wrangler.toml

type = "javascript"
main = "dist/worker.js"

or via the CLI

$ wrangler publish --main "dist/worker.js"

My preference would be via wrangler.toml

@EverlastingBugstopper
Copy link
Contributor

this makes sense to me - i always thought it was strange that we grabbed it from package.json

for webpack type projects, we allow a webpack_config field to point to a custom configuration.

i think for this one we should add a field in the toml javascript_config to match that convention.

@EverlastingBugstopper EverlastingBugstopper added feature Feature requests and suggestions design labels May 12, 2020
@ashleymichal
Copy link
Contributor

for my money i like main, or entry-point or similar; there's not really a config here like with webpack, just an entry point file, so naming it config might be confusing. but semantics aside, i like this idea.

@ashleymichal ashleymichal added this to the wrangler build milestone May 13, 2020
@stale
Copy link

stale bot commented Jul 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Sep 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 11, 2020
@nataliescottdavidson nataliescottdavidson self-assigned this Nov 6, 2020
@Electroid Electroid linked a pull request Feb 22, 2021 that will close this issue
4 tasks
@Electroid Electroid removed the design label Feb 22, 2021
@Electroid Electroid removed this from the wrangler build milestone Apr 16, 2021
@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions.

@stale stale bot added the timed out label Jan 9, 2022
@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically closed because it has not had recent activity. You may re-open the issue if it is still relevant.

@stale stale bot closed this as completed Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature requests and suggestions timed out
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants