-
Notifications
You must be signed in to change notification settings - Fork 33
Issue 104 - Add source map to NPM and PyPi packages #105
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
include dash_renderer/dash_renderer.min.js | ||
include dash_renderer/dash_renderer.dev.js | ||
include dash_renderer/dash_renderer.dev.js.map | ||
include dash_renderer/dash_renderer.min.js | ||
include dash_renderer/dash_renderer.min.js.map | ||
include dash_renderer/react-dom@*.min.js | ||
include dash_renderer/react@*.min.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,5 +80,14 @@ def _set_react_version(react_version): | |
'/dash_renderer/dash_renderer.min.js' | ||
).format(__version__), | ||
'namespace': 'dash_renderer' | ||
}, | ||
{ | ||
'relative_package_path': '{}.min.js.map'.format(__name__), | ||
'dev_package_path': '{}.dev.js.map'.format(__name__), | ||
"external_url": ( | ||
'https://unpkg.com/dash-renderer@{}' | ||
'/dash_renderer/dash_renderer.min.js.map' | ||
).format(__version__), | ||
'namespace': 'dash_renderer' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add maps to Dash There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure it needs an entry here for the map, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or will Dash still allow the request to go through even if it's not defined here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In any case, I'll try it -- I assumed it was necessary :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes dash should allow it, before the map changes in dash I remember seeing 500 errors for map requests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested it out against the dash-table's examples and if the map is not present here, it doesn't get loaded. Dash probably tells the browser there is no such resource; and the browser continues on with its life? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So it seems this additional entry is required There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but the 500 only happens if there is no extension support for map and the map is in the init file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah your right just looked at the code and we check the if the path is registered so it needs to be in the dist for dash to allow it. |
||
} | ||
] |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.15.1' | ||
__version__ = '0.15.2' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bump version |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "dash-renderer", | ||
"version": "0.15.0", | ||
"version": "0.15.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bump version.. for some reason this had not been bumped to 0.15.1 for NPM |
||
"description": "render dash components in react", | ||
"main": "src/index.js", | ||
"scripts": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ module.exports = (env, argv) => { | |
library: dashLibraryName, | ||
libraryTarget: 'window', | ||
}, | ||
devtool: 'source-map', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Source map! This setting is slower but more accurate than other mappings. See here: https://webpack.js.org/configuration/devtool/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to be sure I don't lose my debugging support with this, I remember the plain source-maps did not work so well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the in-IDE support you mentioned to me a little while ago? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I'll try it to be sure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. If it doesn't work I'll change it to: |
||
externals: { | ||
react: 'React', | ||
'react-dom': 'ReactDOM', | ||
|
@@ -57,7 +58,6 @@ module.exports = (env, argv) => { | |
], | ||
}, | ||
], | ||
}, | ||
devtool: mode === 'development' ? 'eval-source-map' : 'none', | ||
} | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding map files, reordering