diff --git a/notebook/lab/handlers.py b/notebook/lab/handlers.py
index d776e38ce..610e27b62 100644
--- a/notebook/lab/handlers.py
+++ b/notebook/lab/handlers.py
@@ -3,8 +3,9 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
+import os
from tornado import web
-from ..base.handlers import IPythonHandler
+from ..base.handlers import IPythonHandler, AuthenticatedFileHandler
class LabHandler(IPythonHandler):
@@ -18,12 +19,12 @@ class LabHandler(IPythonHandler):
terminals_available=self.settings['terminals_available'],
mathjax_url=self.mathjax_url))
-
#-----------------------------------------------------------------------------
# URL to handler mappings
#-----------------------------------------------------------------------------
-
default_handlers = [
(r"/lab", LabHandler),
+ (r"/lab/build/(.*)", AuthenticatedFileHandler,
+ {'path': os.path.join(os.path.dirname(__file__), 'build')}),
]
diff --git a/notebook/static/lab/index.js b/notebook/lab/index.js
similarity index 100%
rename from notebook/static/lab/index.js
rename to notebook/lab/index.js
diff --git a/notebook/static/lab/package.json b/notebook/lab/package.json
similarity index 100%
rename from notebook/static/lab/package.json
rename to notebook/lab/package.json
diff --git a/notebook/static/lab/webpack.conf.js b/notebook/lab/webpack.conf.js
similarity index 93%
rename from notebook/static/lab/webpack.conf.js
rename to notebook/lab/webpack.conf.js
index 9538df3d5..a1d34cad0 100644
--- a/notebook/static/lab/webpack.conf.js
+++ b/notebook/lab/webpack.conf.js
@@ -7,8 +7,9 @@ var ContextReplacementPlugin = require("webpack/lib/ContextReplacementPlugin");
module.exports = {
entry: './index.js',
output: {
- path: './build',
- filename: 'bundle.js'
+ path: __dirname + "/build",
+ filename: "bundle.js",
+ publicPath: "lab/build/"
},
node: {
fs: "empty"
diff --git a/notebook/templates/lab.html b/notebook/templates/lab.html
index a94b96137..d7028a3c3 100644
--- a/notebook/templates/lab.html
+++ b/notebook/templates/lab.html
@@ -95,7 +95,7 @@
"wsUrl": "{{ws_url| urlencode}}",
"notebookPath": "{{notebook_path | urlencode}}"
}
-
+
{% endblock %}