From 5085dd2af763d20fddaa244465af54d5ccbd9661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Sat, 6 Mar 2021 09:35:02 -0500 Subject: [PATCH 1/6] update license to 2021 --- @plotly/webpack-dash-dynamic-import/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/@plotly/webpack-dash-dynamic-import/LICENSE b/@plotly/webpack-dash-dynamic-import/LICENSE index f8dd245665..9dc087422b 100644 --- a/@plotly/webpack-dash-dynamic-import/LICENSE +++ b/@plotly/webpack-dash-dynamic-import/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Plotly +Copyright (c) 2021 Plotly Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From d3e2c99b6a8a49fe09df253bfbe24224f81cf30c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Sat, 6 Mar 2021 09:36:35 -0500 Subject: [PATCH 2/6] check webpack version to inject code the right way --- @plotly/webpack-dash-dynamic-import/src/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/@plotly/webpack-dash-dynamic-import/src/index.js b/@plotly/webpack-dash-dynamic-import/src/index.js index ff7a14dad1..4cab99569f 100644 --- a/@plotly/webpack-dash-dynamic-import/src/index.js +++ b/@plotly/webpack-dash-dynamic-import/src/index.js @@ -1,4 +1,5 @@ const fs = require('fs'); +const webpack = require('webpack'); function getFingerprint() { const package = fs.readFileSync('./package.json'); @@ -78,10 +79,11 @@ class WebpackDashDynamicImport { apply(compiler) { compiler.hooks.compilation.tap('WebpackDashDynamicImport', compilation => { compilation.mainTemplate.hooks.requireExtensions.tap('WebpackDashDynamicImport > RequireExtensions', (source, chunk, hash) => { - return [ - source, - resolveImportSource() - ] + if (/^5[.]/.test(webpack.version)) { + return source + resolveImportSource(); + } else { + return [source, resolveImportSource()]; + } }); }); } From 90a658827d2297e9b7b82f037ed68a0b42c454c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Sat, 6 Mar 2021 09:37:17 -0500 Subject: [PATCH 3/6] bump minor version --- @plotly/webpack-dash-dynamic-import/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/@plotly/webpack-dash-dynamic-import/package.json b/@plotly/webpack-dash-dynamic-import/package.json index b2504683b2..f90e00d8dc 100644 --- a/@plotly/webpack-dash-dynamic-import/package.json +++ b/@plotly/webpack-dash-dynamic-import/package.json @@ -1,6 +1,6 @@ { "name": "@plotly/webpack-dash-dynamic-import", - "version": "1.1.5", + "version": "1.2.0", "description": "Webpack Plugin for Dynamic Import in Dash", "repository": { "type": "git", From 706ff467d00eccaa5f8aa8f34b61637ce1eee90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Sun, 7 Mar 2021 09:35:33 -0500 Subject: [PATCH 4/6] update license files --- @plotly/dash-component-plugins/LICENSE | 2 +- @plotly/webpack-dash-dynamic-import/LICENSE | 2 +- LICENSE | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/@plotly/dash-component-plugins/LICENSE b/@plotly/dash-component-plugins/LICENSE index f8dd245665..ded2aed963 100644 --- a/@plotly/dash-component-plugins/LICENSE +++ b/@plotly/dash-component-plugins/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Plotly +Copyright (c) 2021 Plotly, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/@plotly/webpack-dash-dynamic-import/LICENSE b/@plotly/webpack-dash-dynamic-import/LICENSE index 9dc087422b..ded2aed963 100644 --- a/@plotly/webpack-dash-dynamic-import/LICENSE +++ b/@plotly/webpack-dash-dynamic-import/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Plotly +Copyright (c) 2021 Plotly, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/LICENSE b/LICENSE index c78d61d94c..1196ce9631 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Plotly, Inc +Copyright (c) 2021 Plotly, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 27e34faac3fcc1b87719268c00b9ec309f681308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Sun, 7 Mar 2021 20:20:12 -0500 Subject: [PATCH 5/6] no need for v5 vs. v4 - just resolve the string --- @plotly/webpack-dash-dynamic-import/src/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/@plotly/webpack-dash-dynamic-import/src/index.js b/@plotly/webpack-dash-dynamic-import/src/index.js index 4cab99569f..147e99be0c 100644 --- a/@plotly/webpack-dash-dynamic-import/src/index.js +++ b/@plotly/webpack-dash-dynamic-import/src/index.js @@ -79,11 +79,7 @@ class WebpackDashDynamicImport { apply(compiler) { compiler.hooks.compilation.tap('WebpackDashDynamicImport', compilation => { compilation.mainTemplate.hooks.requireExtensions.tap('WebpackDashDynamicImport > RequireExtensions', (source, chunk, hash) => { - if (/^5[.]/.test(webpack.version)) { - return source + resolveImportSource(); - } else { - return [source, resolveImportSource()]; - } + return source + resolveImportSource(); }); }); } From cb99659acc32567292765458bc26d96a7c908a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Mon, 8 Mar 2021 09:47:24 -0500 Subject: [PATCH 6/6] clean up unused import --- @plotly/webpack-dash-dynamic-import/src/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/@plotly/webpack-dash-dynamic-import/src/index.js b/@plotly/webpack-dash-dynamic-import/src/index.js index 147e99be0c..490e66b904 100644 --- a/@plotly/webpack-dash-dynamic-import/src/index.js +++ b/@plotly/webpack-dash-dynamic-import/src/index.js @@ -1,5 +1,4 @@ const fs = require('fs'); -const webpack = require('webpack'); function getFingerprint() { const package = fs.readFileSync('./package.json');