Skip to content

Commit 6a70d14

Browse files
committed
add webpack config for consistent builds across platforms
1 parent 0352c8a commit 6a70d14

File tree

8 files changed

+17
-5
lines changed

8 files changed

+17
-5
lines changed

js/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
},
3131
"jupyterlab": {
3232
"mimeExtension": true,
33-
"outputDir": "../plotly/labextension"
33+
"outputDir": "../plotly/labextension",
34+
"webpackConfig": "./webpack.config.js"
3435
}
3536
}

js/webpack.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
// Note: This config has no effect on the lab extension functionality,
3+
// but it helps ensure that webpack uses the same module and chunk IDs
4+
// across platforms, which makes it easier to compare build artifacts.
5+
optimization: {
6+
moduleIds: 'natural',
7+
chunkIds: 'natural',
8+
realContentHash: true
9+
},
10+
};

plotly/labextension/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
"jupyterlab": {
3232
"mimeExtension": true,
3333
"outputDir": "../plotly/labextension",
34+
"webpackConfig": "./webpack.config.js",
3435
"_build": {
35-
"load": "static/remoteEntry.6213e23b3bdd99ae0b34.js",
36+
"load": "static/remoteEntry.a90ef69e866c18565afe.js",
3637
"mimeExtension": "./mimeExtension"
3738
}
3839
}

plotly/labextension/static/1.f29faa6937f75272d9d5.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plotly/labextension/static/340.330950829c5d59eca692.js.LICENSE.txt renamed to plotly/labextension/static/1.f29faa6937f75272d9d5.js.LICENSE.txt

File renamed without changes.

plotly/labextension/static/340.330950829c5d59eca692.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

plotly/labextension/static/remoteEntry.6213e23b3bdd99ae0b34.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

plotly/labextension/static/remoteEntry.a90ef69e866c18565afe.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)