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

wrangler init --type="javascript" doesn’t work as expected #1960

Closed
tylerbrostrom opened this issue Jun 18, 2021 · 1 comment · Fixed by #1988
Closed

wrangler init --type="javascript" doesn’t work as expected #1960

tylerbrostrom opened this issue Jun 18, 2021 · 1 comment · Fixed by #1988
Labels
bug Something isn't working

Comments

@tylerbrostrom
Copy link

🐛 Bug report

Describe the bug

wrangler init doesn’t work as expected when --type="javascript".

Running wrangler init --type="javascript" outputs a wrangler.toml file where, unexpectedly, type = 'webpack' and target_type = "js".

It is accompanied by a warning in the console:

⚠️  The template recommends the "webpack" type. Using type "js" may cause errors, we recommend changing the type field in wrangler.toml to "webpack"

Reproduce the bug

Run wrangler init --type="javascript"

Expected behavior

Running wrangler init --type="javascript" should produce a wrangler.toml similar to the following:

# ... truncated
type = "javascript"
build.command = "npm install && npm run build"

Environment and versions

Fill out the following information about your environment.

  • operating system: MacOS 10.15.7
  • output of wrangler -V: wrangler 1.17.0
  • output of node -v: v14.16.1
  • content of wrangler.toml: N/A
@tylerbrostrom tylerbrostrom added the bug Something isn't working label Jun 18, 2021
@caass
Copy link
Contributor

caass commented Jun 29, 2021

Thanks for your report! Looking into this :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants