Skip to content

Commit 7e65f94

Browse files
authored
Merge pull request #19 from jupyter-widgets/webpack-public-path
Include __webpack_public_path__ in classic extension
2 parents 121baba + 79c1570 commit 7e65f94

File tree

1 file changed

+10
-0
lines changed
  • {{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/nbextension/static

1 file changed

+10
-0
lines changed

{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/nbextension/static/extension.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Entry point for the notebook bundle containing custom model definitions.
2+
//
3+
// Setup notebook base URL
4+
//
5+
// Some static assets may be required by the custom widget javascript. The base
6+
// url for the notebook is not known at build time and is therefore computed
7+
// dynamically.
8+
__webpack_public_path__ = document.querySelector('body').getAttribute('data-base-url') + 'nbextensions/{{ cookiecutter.npm_package_name }}';
9+
10+
111
define(function() {
212
"use strict";
313

0 commit comments

Comments
 (0)