-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: work towards ipywidgets8 with publicPath
- Loading branch information
1 parent
8e81c43
commit 049245f
Showing
5 changed files
with
18 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// In an AMD module, we set the public path using the magic requirejs 'module' dependency | ||
// See https://github.com/requirejs/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-and-standard-AMD-define#module | ||
// Since 'module' is a requirejs magic module, we must include 'module' in the webpack externals configuration. | ||
var module = require('module'); | ||
var url = new URL(module.uri, document.location) | ||
// Using lastIndexOf('/')+1 gives us the empty string if there is no '/', so pathname becomes '/' | ||
url.pathname = url.pathname.slice(0,url.pathname.lastIndexOf('/')+1); | ||
__webpack_public_path__ = `${url.origin}${url.pathname}`; |
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
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