-
-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7df8148
commit 43d97d6
Showing
6 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import * as file from "./file.json"; | ||
|
||
console.log(file.foo); |
17 changes: 17 additions & 0 deletions
17
test/comparison-tests/resolveJsonModule/expectedOutput-3.8/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Asset Size Chunks Chunk Names | ||
bundle.js 1.12 KiB 0 main | ||
Entrypoint main = bundle.js | ||
[0] ./app.ts 232 bytes {0} [built] [failed] [2 errors] | ||
|
||
WARNING in configuration | ||
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment. | ||
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/ | ||
|
||
ERROR in tsconfig.json | ||
[90m[tsl] [39m[1m[31mERROR[39m[22m | ||
[1m[31m TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["ap.ts","file.json"]' and 'exclude' paths were '[]'.[39m[22m | ||
|
||
ERROR in ./app.ts | ||
Module build failed (from index.js): | ||
Error: [31merror while parsing tsconfig.json[39m | ||
at Object.loader (dist/index.js:19:18) |
17 changes: 17 additions & 0 deletions
17
test/comparison-tests/resolveJsonModule/expectedOutput-transpile-3.8/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Asset Size Chunks Chunk Names | ||
bundle.js 1.12 KiB 0 main | ||
Entrypoint main = bundle.js | ||
[0] ./app.ts 232 bytes {0} [built] [failed] [2 errors] | ||
|
||
WARNING in configuration | ||
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment. | ||
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/ | ||
|
||
ERROR in tsconfig.json | ||
[90m[tsl] [39m[1m[31mERROR[39m[22m | ||
[1m[31m TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["ap.ts","file.json"]' and 'exclude' paths were '[]'.[39m[22m | ||
|
||
ERROR in ./app.ts | ||
Module build failed (from index.js): | ||
Error: [31merror while parsing tsconfig.json[39m | ||
at Object.loader (dist/index.js:19:18) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"foo": "bar" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"compilerOptions": { | ||
"resolveJsonModule": true, | ||
"composite": true | ||
}, | ||
"include": ["ap.ts", "file.json"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
entry: './app.ts', | ||
output: { | ||
filename: 'bundle.js' | ||
}, | ||
resolve: { | ||
extensions: ['.ts', '.json'] | ||
}, | ||
module: { | ||
rules: [{ test: /\.tsx?$/, loader: 'ts-loader' }] | ||
} | ||
}; |