Skip to content

Commit

Permalink
build: Prevent accidental build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
NiGhTTraX committed Aug 3, 2021
1 parent d8f56fe commit 65d32ae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
6 changes: 6 additions & 0 deletions examples/webpack/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false
}
}
8 changes: 7 additions & 1 deletion examples/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ module.exports = {
plugins: [new TsconfigPathsPlugin()],
},
module: {
rules: [{ test: /\.tsx?$/, loader: "ts-loader" }],
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
options: { configFile: "tsconfig.build.json" },
},
],
},
};
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"paths": {
"@nighttrax/components/*": ["packages/components/src/*"],
"@nighttrax/*": ["packages/*/src"]
}
},
/* Avoid littering the projects with build artifacts from accidental
builds e.g. started from the IDE. The build configs should turn
this off. */
"noEmit": true
}
}

0 comments on commit 65d32ae

Please sign in to comment.