make test case independent from package.json

This commit is contained in:
Tobias Koppers 2020-09-28 10:58:03 +02:00
parent 577f05954e
commit 5db44d0c4e
4 changed files with 10 additions and 5 deletions

View File

@ -887,9 +887,9 @@ chunk trees.js (trees) 71 bytes [rendered]
`;
exports[`StatsTestCases should print correct stats for ignore-warnings 1`] = `
"asset main.js 943 bytes [emitted] (name: main)
orphan modules 8.55 KiB [orphan] 9 modules
./index.js + 9 modules 8.72 KiB [built] [code generated]
"asset main.js 957 bytes [emitted] (name: main)
orphan modules 617 bytes [orphan] 9 modules
./index.js + 9 modules 790 bytes [built] [code generated]
WARNING in ./module.js?4 3:12-20
Should not import the named export 'homepage' (imported as 'homepage') from default-exporting module (only default export is available soon)

View File

@ -1,3 +1,3 @@
import { homepage } from "../../../package.json";
import { homepage } from "./package.json";
console.log(homepage);

View File

@ -1,3 +1,3 @@
import { name } from "../../../package.json";
import { name } from "./package.json";
console.log(name);

View File

@ -0,0 +1,5 @@
{
"name": "webpack-test-ignore-warnings",
"license": "MIT",
"homepage": "https://github.com/webpack/webpack"
}