Skip to content

Commit

Permalink
Merge pull request #18 from wavebox/development
Browse files Browse the repository at this point in the history
Fix the webpack patch. Update deps
  • Loading branch information
Thomas101 authored Sep 4, 2024
2 parents d3fd259 + 58737f4 commit f511251
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 10 additions & 13 deletions patches/webpack+5.90.3.patch → patches/webpack+5.94.0.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
diff --git a/node_modules/webpack/.DS_Store b/node_modules/webpack/.DS_Store
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/webpack/lib/ProvidePlugin.js b/node_modules/webpack/lib/ProvidePlugin.js
index 1487dec..a17fe98 100644
index 28c3ce5..5cfa897 100644
--- a/node_modules/webpack/lib/ProvidePlugin.js
+++ b/node_modules/webpack/lib/ProvidePlugin.js
@@ -52,6 +52,24 @@ class ProvidePlugin {
Expand Down Expand Up @@ -30,27 +27,27 @@ index 1487dec..a17fe98 100644
/**
* @param {JavascriptParser} parser the parser
* @param {JavascriptParserOptions} parserOptions options
@@ -60,6 +78,7 @@ class ProvidePlugin {
const handler = (parser, parserOptions) => {
Object.keys(definitions).forEach(name => {
const request = [].concat(definitions[name]);
@@ -62,6 +80,7 @@ class ProvidePlugin {
const request =
/** @type {string[]} */
([]).concat(definitions[name]);
+ const originalRequest = request
const splittedName = name.split(".");
if (splittedName.length > 0) {
splittedName.slice(1).forEach((_, i) => {
@@ -69,6 +88,9 @@ class ProvidePlugin {
for (const [i, _] of splittedName.slice(1).entries()) {
@@ -71,6 +90,9 @@ class ProvidePlugin {
}

parser.hooks.expression.for(name).tap(PLUGIN_NAME, expr => {
+ // Wavebox - rewrite dynamic imports
+ const request = rewriteWaveboxDynamicRequest(parser, originalRequest)
+
const nameIdentifier = name.includes(".")
? `__webpack_provided_${name.replace(/\./g, "_dot_")}`
: name;
@@ -84,6 +106,9 @@ class ProvidePlugin {
@@ -86,6 +108,9 @@ class ProvidePlugin {
});

parser.hooks.call.for(name).tap(PLUGIN_NAME, expr => {
+ // Wavebox - rewrite dynamic imports
+ const request = rewriteWaveboxDynamicRequest(parser, originalRequest)
Expand Down

0 comments on commit f511251

Please sign in to comment.