Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
vankop committed Feb 25, 2022
1 parent 8d1e46e commit 0a7446b
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
@@ -0,0 +1 @@
export default "a";
@@ -0,0 +1,5 @@
{
"name": "foo",
"version": "1.0.0",
"module": "./a.js"
}
@@ -0,0 +1 @@
export default "b";
@@ -0,0 +1,5 @@
{
"name": "foo",
"version": "1.0.0",
"module": "./b.js"
}
7 changes: 7 additions & 0 deletions test/configCases/resolve/context-resolve-with-ignore/index.js
@@ -0,0 +1,7 @@
const a = String.fromCharCode("a".charCodeAt(0));
const b = String.fromCharCode("b".charCodeAt(0));

it("should compile correctly", async () => {
expect((await /* webpackMode: "lazy" */ import(`foo/${a}`)).default).toEqual({});
expect((await /* webpackMode: "lazy" */ import(`foo/${b}`)).default).toBe("b");
});
@@ -0,0 +1,11 @@
const path = require("path");

/** @type {import("../../../../").Configuration} */
module.exports = {
resolve: {
modules: [path.resolve(__dirname, "a"), path.resolve(__dirname, "b")],
alias: {
[path.resolve(__dirname, "a/foo")]: false
}
}
};

0 comments on commit 0a7446b

Please sign in to comment.