Skip to content

Commit

Permalink
test: added
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Jul 11, 2024
1 parent 080e54f commit 40b1a77
Show file tree
Hide file tree
Showing 49 changed files with 271 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/javascript/CommonJsChunkFormatPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
const { ConcatSource, RawSource } = require("webpack-sources");
const RuntimeGlobals = require("../RuntimeGlobals");
const Template = require("../Template");
const { getUndoPath } = require("../util/identifier");
const {
getChunkFilenameTemplate,
getCompilationHooks
Expand All @@ -16,7 +17,6 @@ const {
generateEntryStartup,
updateHashForEntryStartup
} = require("./StartupHelpers");
const { getUndoPath } = require("../util/identifier");

/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Compiler")} Compiler */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
findBundle: function () {
return [
"./dir5/dir6/runtime~one.js",
"./one.js",
"./dir5/dir6/runtime~two.js",
"./dir2/two.js",
"./dir5/dir6/runtime~three.js",
"./three.js",
"./dir5/dir6/runtime~four.js",
"./dir4/four.js",
"./dir5/dir6/runtime~five.js",
"./dir5/dir6/five.js",
"./dir5/dir6/runtime~six.js",
"./dir5/dir6/six.js"
];
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
output: {
filename: "[name].js"
},
target: ["es2022", "async-node"],
entry: {
one: "./one",
"dir2/two": "./two",
"/three": "./three",
"/dir4/four": "./four",
"/dir5/dir6/five": "./five",
"/dir5/dir6/six": "./six"
},
optimization: {
runtimeChunk: {
name: entrypoint => {
return `dir5/dir6/runtime~${entrypoint.name.split("/").pop()}`;
}
}
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
findBundle: function () {
return [
"./dir5/dir6/runtime~one.mjs",
"./one.mjs",
"./dir5/dir6/runtime~two.mjs",
"./dir2/two.mjs",
"./dir5/dir6/runtime~three.mjs",
"./three.mjs",
"./dir5/dir6/runtime~four.mjs",
"./dir4/four.mjs",
"./dir5/dir6/runtime~five.mjs",
"./dir5/dir6/five.mjs",
"./dir5/dir6/runtime~six.mjs",
"./dir5/dir6/six.mjs"
];
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
output: {
filename: "[name].mjs",
module: true
},
target: ["es2022", "async-node"],
entry: {
one: "./one",
"dir2/two": "./two",
"/three": "./three",
"/dir4/four": "./four",
"/dir5/dir6/five": "./five",
"/dir5/dir6/six": "./six"
},
optimization: {
runtimeChunk: {
name: entrypoint => {
return `dir5/dir6/runtime~${entrypoint.name.split("/").pop()}`;
}
}
},
experiments: {
outputModule: true
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
findBundle: function () {
return [
"./runtime/one.js",
"./one.js",
"./runtime/dir2/two.js",
"./dir2/two.js",
"./runtime/three.js",
"./three.js",
"./runtime/dir4/four.js",
"./dir4/four.js",
"./runtime/dir5/dir6/five.js",
"./dir5/dir6/five.js",
"./runtime/dir5/dir6/six.js",
"./dir5/dir6/six.js"
];
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
output: {
filename: "[name].js"
},
target: ["es2022", "async-node"],
entry: {
one: "./one",
"dir2/two": "./two",
"/three": "./three",
"/dir4/four": "./four",
"/dir5/dir6/five": "./five",
"/dir5/dir6/six": "./six"
},
optimization: {
runtimeChunk: {
name: entrypoint => {
return `runtime/${entrypoint.name.replace(/^\/+/g, "")}`;
}
}
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
findBundle: function () {
return [
"./runtime/one.mjs",
"./one.mjs",
"./runtime/dir2/two.mjs",
"./dir2/two.mjs",
"./runtime/three.mjs",
"./three.mjs",
"./runtime/dir4/four.mjs",
"./dir4/four.mjs",
"./runtime/dir5/dir6/five.mjs",
"./dir5/dir6/five.mjs",
"./runtime/dir5/dir6/six.mjs",
"./dir5/dir6/six.mjs"
];
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
output: {
filename: "[name].mjs",
module: true
},
target: ["es2022", "async-node"],
entry: {
one: "./one",
"dir2/two": "./two",
"/three": "./three",
"/dir4/four": "./four",
"/dir5/dir6/five": "./five",
"/dir5/dir6/six": "./six"
},
optimization: {
runtimeChunk: {
name: entrypoint => {
return `runtime/${entrypoint.name.replace(/^\/+/g, "")}`;
}
}
},
experiments: {
outputModule: true
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
findBundle: function () {
return [
"./runtime.js",
"./one.js",
"./dir2/two.js",
"./three.js",
"./dir4/four.js",
"./dir5/dir6/five.js",
"./dir5/dir6/six.js"
];
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
output: {
filename: "[name].js"
},
target: ["es2022", "async-node"],
entry: {
one: "./one",
"dir2/two": "./two",
"/three": "./three",
"/dir4/four": "./four",
"/dir5/dir6/five": "./five",
"/dir5/dir6/six": "./six"
},
optimization: {
runtimeChunk: "single"
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
findBundle: function () {
return [
"./runtime.mjs",
"./one.mjs",
"./dir2/two.mjs",
"./three.mjs",
"./dir4/four.mjs",
"./dir5/dir6/five.mjs",
"./dir5/dir6/six.mjs"
];
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it("should compile", () => {});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/** @type {import("../../../../").Configuration} */
module.exports = {
output: {
filename: "[name].mjs",
module: true
},
target: ["es2022", "async-node"],
entry: {
one: "./one",
"dir2/two": "./two",
"/three": "./three",
"/dir4/four": "./four",
"/dir5/dir6/five": "./five",
"/dir5/dir6/six": "./six"
},
optimization: {
runtimeChunk: "single"
},
experiments: {
outputModule: true
}
};

0 comments on commit 40b1a77

Please sign in to comment.