This repository was archived by the owner on Aug 29, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 72
Handle external 'prop-types' correctly in prod build #488
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9a4d7fb
externalize prop-types correctly in prod build
e87fa6a
peer dep
5d7d08d
only libraryTarget
4c8ce2f
update build
194552f
Merge branch 'master' into prod-prop-types
Marc-Andre-Rivet ffaf5ed
undo
a729964
Merge branch 'prod-prop-types' of github.com:plotly/dash-table into p…
d7fae00
trailing white space
cb2d47b
tslint / +undo
9aa6281
build to `window` variable like other dash repos
cd7a5cf
fix lint
d15c38e
Update CHANGELOG.md
Marc-Andre-Rivet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -19,29 +19,19 @@ module.exports = (options = {}) => { | |
| return { | ||
| entry: { | ||
| bundle: './src/dash-table/index.ts', | ||
| demo: ['./demo/index.js', './demo/index.html'] | ||
| demo: ['./demo/index.html', './demo/index.js'] | ||
| }, | ||
| mode: mode, | ||
| output: { | ||
| path: path.resolve(__dirname, `./../../${dashLibraryName}`), | ||
| filename: '[name].js', | ||
| library: dashLibraryName, | ||
| libraryTarget: 'umd' | ||
| libraryTarget: 'window' | ||
| }, | ||
| devtool: 'source-map', | ||
| externals: { | ||
| react: { | ||
| commonjs: 'react', | ||
| commonjs2: 'react', | ||
| amd: 'React', | ||
| root: 'React' | ||
| }, | ||
| 'react-dom': { | ||
| commonjs: 'react-dom', | ||
| commonjs2: 'react-dom', | ||
| amd: 'ReactDOM', | ||
| root: 'ReactDOM' | ||
| }, | ||
| react: 'React', | ||
| 'react-dom': 'ReactDOM', | ||
|
Contributor
Author
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. This can be simplified as it's target is |
||
| 'plotly.js': 'Plotly' | ||
| }, | ||
| module: { | ||
|
|
||
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Loaded unto
window.dash_tablein the browserThere 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.
Will changing how this is exposed have any side-effects for non-Dash users? Could you imagine anyone using RequireJS or anything else that expects a
umdin their JavaScript project? I suppose, obviously, we wouldn't expect Node.js users (without awindowglobal namespace) to be using this project. I'm also not sure if there's any webpack magic that makes this a non-issue.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.
This should not have an impact.