rsnext/test/integration/telemetry/next.config.swc-plugins
OJ Kwon 2150d1aee6
feat(next/build): send next-swc plugins telemetry (#38116)
* Requires prerequisite PR https://github.com/vercel/next-telemetry/pull/84

This PR adds telemetry to send list of the experimental swc plugins from next.config.js. Implementation largely mimics existing plugins telemetry for next_package (https://github.com/vercel/next.js/blob/canary/packages/next/telemetry/events/plugins.ts), with small modification to read swc plugin package instead.

One notable difference is swc plugin telemetry can be sent without version. This is due to swc plugins can be specified with absolute path without any npm pkg resolutions.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-30 19:05:35 +00:00

9 lines
No EOL
191 B
Text

module.exports = {
experimental: {
swcPlugins: [
["swc-plugin-coverage-instrument", {}],
["@swc/plugin-relay", {}],
["/test/absolute_path/plugin.wasm", {}]
]
}
}