Skip to content

Commit

Permalink
Meta: generate the JS files even when TS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jan 21, 2019
1 parent e0bce6f commit b6f6c97
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

module.exports = () => ({
module.exports = (env, argv) => ({
devtool: 'sourcemap',
entry: {
content: './source/content',
Expand All @@ -18,7 +18,15 @@ module.exports = () => ({
rules: [
{
test: /\.(js|ts|tsx)$/,
use: 'ts-loader',
use: [{
loader: 'ts-loader',
query: {
compilerOptions: {
// With this, TS will error but the file will still be generated (on watch only)
noEmitOnError: argv.watch === false
}
}
}],
exclude: /node_modules/
}
]
Expand Down

0 comments on commit b6f6c97

Please sign in to comment.