-
-
Notifications
You must be signed in to change notification settings - Fork 434
Closed
Description
Expected Behaviour
Emit json files when we set this tsconfig flag "resolveJsonModule" to be true.
Actual Behaviour
There is no any json file emitted.
Steps to Reproduce the Problem
Given the folder structure:
src/
index.ts <--- this file `import package from "../package.json"`
package.json
webpack.config.js
The webpack config like below:
entry: {
"src/index": path.join(__dirname, "src/index.ts")
},
output: {
path: path.join(__dirname, "dist"),
},
loader: "ts-loader" with no other options.and tsconfig.json like below:
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "esnext",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"sourceMap": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"removeComments": true,
"strict": true,
"alwaysStrict": true
},
"include": ["src"]
}After invoke webpack, I only get the dist/src/index.js file, not the dist/package.json file.
Location of a Minimal Repository that Demonstrates the Issue.
PatrickDesign
Metadata
Metadata
Assignees
Labels
No labels