We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05eb53e commit c2949d4Copy full SHA for c2949d4
packages/node-integration-tests/src/smoke/smoke.ts
@@ -0,0 +1,8 @@
1
+import { default as AnalyticsDefaultImport } from '@segment/analytics-node'
2
+import { Analytics as AnalyticsNamedImport } from '@segment/analytics-node'
3
+
4
+{
5
+ // test named imports vs default imports
6
+ new AnalyticsNamedImport({ writeKey: 'hello world' })
7
+ new AnalyticsDefaultImport({ writeKey: 'hello world' })
8
+}
packages/node/src/index.ts
@@ -1,2 +1,6 @@
export * from './app/analytics-node'
export type { AnalyticsSettings } from './app/settings'
+// export Analytics as both a named export and a default export (for backwards-compat. reasons)
+import { Analytics } from './app/analytics-node'
+export default Analytics
0 commit comments