firebase / firebase/firebase-tools

[extensions] Setup `typescript` package with not `devDependencies` but `dependencies`

Open
#6,057 0 comments 0 reactions 0 assignees View on GitHub
Extensions Manifest type: feature request
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

When we start to develop extensions with `ext:dev:init`, auto created `pacakges.json` has `typescript` dependency in `devDependencies`.
https://github.com/firebase/firebase-tools/blob/c0a59a59ca9230a98713553a1c0335d6957be154/templates/extensions/typescript/package.lint.json#L24

However, during `ext:dev:upload` the `npm clean-install` is run with the `--production` flag, which causes "devDependencies" to be ignored. If the package is placed in `devDependencies`, the below error occurs.
```sh
Error: generic::invalid_argument: failed to build ExtensionVersion "EXTENSION_NAME" source: failed to build NPM package:
```

So, we have to replace `typescript` package from `devDependencies` to `dependencies` whenever developing new extension.

**Expected**

The `typescript` package should be placed with `dependencies` during setup to prevent developer confusion. But, it is just my idea, could you let me know if there are any reasons why it should be placed in devDependencies.

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.