Skip to content

Commit

Permalink
Merge pull request #48 from getsentry/feat/webpack5-polyfills
Browse files Browse the repository at this point in the history
feat: webpack5 polyfills
  • Loading branch information
Stephen Cefali authored Jun 7, 2022
2 parents a15445c + 35875b3 commit 84956ce
Show file tree
Hide file tree
Showing 5 changed files with 331 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 0.3.0

Use polyfills for path, crypto, and stream

## 0.2.2

- Fix bug with TS type incorrect
Expand Down
7 changes: 4 additions & 3 deletions config/webpack.build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ module.exports = {
resolve: {
extensions: ['.tsx', '.ts', '.js'],
fallback: {
"path": false,
"crypto": false
}
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
buffer: require.resolve('buffer/'),
},
},
};
5 changes: 3 additions & 2 deletions config/webpack.demo.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ module.exports = {
resolve: {
extensions: ['.tsx', '.ts', '.js'],
fallback: {
path: false,
crypto: false,
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
buffer: require.resolve('buffer/'),
},
},
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentry-internal/global-search",
"description": "JavaScript library and helper utilities for searching Sentry sites via Algolia.",
"version": "0.2.2",
"version": "0.3.0",
"author": "Sentry",
"dependencies": {
"@types/dompurify": "^2.0.4",
Expand Down Expand Up @@ -32,6 +32,8 @@
"@types/htmlparser2": "^3.10.3",
"@types/js-yaml": "^3.12.5",
"babel-loader": "^8.1.0",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"css-loader": "^4.2.1",
"dotenv": "^8.2.0",
"html-loader": "^1.2.1",
Expand All @@ -46,6 +48,7 @@
"remark-html": "^12.0.0",
"sass": "^1.26.10",
"sass-loader": "^9.0.3",
"stream-browserify": "^3.0.0",
"style-loader": "^1.2.1",
"ts-node": "^9.0.0",
"typescript": "^4.0.2",
Expand Down
Loading

1 comment on commit 84956ce

@vercel
Copy link

@vercel vercel bot commented on 84956ce Jun 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sentry-algolia – ./

sentry-algolia.sentry.dev
sentry-algolia-git-master.sentry.dev

Please sign in to comment.