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 build warning for require.resolve() #506

Merged
merged 2 commits into from
Mar 22, 2024
Merged

Fix build warning for require.resolve() #506

merged 2 commits into from
Mar 22, 2024

Conversation

ybiquitous
Copy link
Member

This change doesn't use require.resolve() to prevent the build warning below:

$ npm run bundle

> [email protected] bundle
> npm run bundle-base -- --sourcemap

> [email protected] bundle-base
> ts-node --transpile-only -P tsconfig.scripts.json scripts/bundle.ts --sourcemap

▲ [WARNING] "./start-server" should be marked as external for use with "require.resolve"

    build/extension/extension.js:13:39:
      13 │     const serverPath = require.resolve('./start-server');
         ╵                                        ~~~~~~~~~~~~~~~~

1 warning

Which issue, if any, is this issue related to?

None.

Is there anything in the PR that needs further explanation?

No, it's self-explanatory.

This change doesn't use `require.resolve()` to prevent the build warning below:

```sh-session
$ npm run bundle

> [email protected] bundle
> npm run bundle-base -- --sourcemap

> [email protected] bundle-base
> ts-node --transpile-only -P tsconfig.scripts.json scripts/bundle.ts --sourcemap

▲ [WARNING] "./start-server" should be marked as external for use with "require.resolve"

    build/extension/extension.js:13:39:
      13 │     const serverPath = require.resolve('./start-server');
         ╵                                        ~~~~~~~~~~~~~~~~

1 warning
```
@ybiquitous
Copy link
Member Author

Thanks for the review. I just resolved conflicts, so I'll merge this.

@ybiquitous ybiquitous merged commit 8ff854f into main Mar 22, 2024
9 checks passed
@ybiquitous ybiquitous deleted the fix-build-warning branch March 22, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants