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: Expose main/renderer for deep import #148

Merged
merged 4 commits into from
Jan 11, 2019
Merged

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented Jan 11, 2019

This indirectly fixes
#142
#92

since this PR removes this https://github.com/getsentry/sentry-electron/compare/fix/bump-mod-require?expand=1#diff-d99e72de0bd44751f9da4e3935d68f84R245

Now if you run into the mod.require issue you can import the SDK differntly:

import { init } from '@sentry/electron/dist/main'
import * as Sentry from '@sentry/electron'

Remove package.json
Bump @sentry/* deps
@HazAT HazAT self-assigned this Jan 11, 2019
@HazAT HazAT merged commit a1492ef into master Jan 11, 2019
@HazAT HazAT deleted the fix/bump-mod-require branch January 11, 2019 14:22
@dperetti
Copy link

dperetti commented Sep 2, 2019

With this way of importing init, webpack will complain that "Critical dependency: the request of a dependency is an expression"

WARNING in ./node_modules/encoding/lib/iconv-loader.js 9:12-34
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/encoding/lib/encoding.js
 @ ./node_modules/electron-fetch/lib/index.es.js
 @ ./node_modules/@sentry/electron/dist/main/uploader.js
 @ ./node_modules/@sentry/electron/dist/main/backend.js
 @ ./node_modules/@sentry/electron/dist/main/index.js
 @ ./src/browser/js/browser.js
 @ multi ./src/browser/js/browser.js```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants