-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove webpack imports in npm package (#925)
- Loading branch information
1 parent
fb4e36b
commit 7b35238
Showing
9 changed files
with
45 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* global __webpack_require__ */ | ||
|
||
__webpack_require__.nc = (() => { | ||
try { | ||
return document?.currentScript?.nonce | ||
} catch (ex) { | ||
// Swallow error and proceed like nonce is not defined | ||
// This will happen when the agent is loaded in a worker scope | ||
} | ||
|
||
return '' | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
/* global __webpack_require__ */ | ||
|
||
__webpack_require__.nc = (() => { | ||
try { | ||
return document?.currentScript?.nonce | ||
} catch (ex) { | ||
// Swallow error and proceed like nonce is not defined | ||
// This will happen when the agent is loaded in a worker scope | ||
} | ||
|
||
return '' | ||
})() | ||
// We don't support setting automating the nonce attribute in the npm package |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Set the default CDN or remote for fetching the assets; NPM shouldn't change this var. | ||
|
||
export const redefinePublicPath = (urlString) => { | ||
const isOrigin = urlString.startsWith('http') | ||
// Input is not expected to end in a slash, but webpack concats as-is, so one is inserted. | ||
urlString += '/' | ||
// If there's no existing HTTP scheme, the secure protocol is prepended by default. | ||
__webpack_public_path__ = isOrigin ? urlString : 'https://' + urlString // eslint-disable-line | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
// Set the default CDN or remote for fetching the assets; NPM shouldn't change this var. | ||
|
||
export const redefinePublicPath = (urlString) => { | ||
const isOrigin = urlString.startsWith('http') | ||
// Input is not expected to end in a slash, but webpack concats as-is, so one is inserted. | ||
urlString += '/' | ||
// If there's no existing HTTP scheme, the secure protocol is prepended by default. | ||
__webpack_public_path__ = isOrigin ? urlString : 'https://' + urlString // eslint-disable-line | ||
export const redefinePublicPath = () => { | ||
// We don't support setting public path in webpack via NPM build. | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters