Skip to content

Commit

Permalink
fix: copy EE frontend files during dockerfile build (#18951)
Browse files Browse the repository at this point in the history
* fix: try different import mechanism

* dockerfile copy

* but without concatenation

* Update UI snapshots for `chromium` (1)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
pauldambra and github-actions[bot] authored Nov 29, 2023
1 parent 2a2cb37 commit 41ba028
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
19 changes: 9 additions & 10 deletions frontend/@posthog/ee/exports.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { PostHogEE } from './types'

export default async (): Promise<PostHogEE> => {
// eslint-disable-next-line import/no-restricted-paths
return import('../../../ee/frontend/exports')
.then((ee) => {
return ee.default()
})
.catch(() => {
return {
enabled: false,
}
})
try {
// this has to import it...
// eslint-disable-next-line import/no-restricted-paths
return (await import('../../../ee/frontend/exports')).default()
} catch (e) {
return {
enabled: false,
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions production.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ RUN corepack enable && \
rm -rf /tmp/pnpm-store

COPY frontend/ frontend/
COPY ee/frontend/ ee/frontend/
COPY ./bin/ ./bin/
COPY babel.config.js tsconfig.json webpack.config.js ./
RUN pnpm build
Expand Down

0 comments on commit 41ba028

Please sign in to comment.