Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ common-dist/
packages/cbioportal-frontend-commons/dist
.sass-cache
.rpt2_cache
.webpack-cache/
frontend-cbioportal.iml
test/
.classpath
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"typeRoots": [
"node_modules/@types"
],
"lib":["es2015", "es2016.array.include", "dom"]
"lib":["es2015", "es2016.array.include", "dom"],
"incremental": true,
"tsBuildInfoFile": "./tsDist/.tsbuildinfo"
},
"exclude": ["./node_modules/*"],
"include": [
Expand Down
19 changes: 14 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,19 @@ var config = {
publicPath: '/',
},

// Enable webpack persistent caching for faster rebuilds
cache: {
type: 'filesystem',
cacheDirectory: path.resolve(__dirname, '.webpack-cache'),
buildDependencies: {
config: [__filename],
},
},

optimization: {
minimizer: [
new TerserPlugin({
parallel: false,
parallel: true,
}),
],
},
Expand Down Expand Up @@ -212,8 +221,7 @@ var config = {
{
loader: 'ts-loader',
options: {
transpileOnly:
isDev || isTest || process.env.NETLIFY,
transpileOnly: true,
},
},
],
Expand Down Expand Up @@ -469,8 +477,6 @@ if (isDev || isTest) {
'shared/Empty.tsx'
);

config.plugins.push(new ForkTsCheckerWebpackPlugin());

// css modules for any scss matching test
config.module.rules.push({
test: /\.module\.scss$/,
Expand Down Expand Up @@ -564,6 +570,9 @@ if (isDev || isTest) {
});
}

// Add ForkTsCheckerWebpackPlugin for all builds since we use transpileOnly
config.plugins.push(new ForkTsCheckerWebpackPlugin());

// reduce logging to optimize netlify build
if (process.env.BUILD_REPORT_ERRORS_ONLY === 'true') {
config.stats = 'errors-only';
Expand Down