Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Fix: Add hack to stop null exception #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DanielFallon
Copy link
Contributor

@DanielFallon DanielFallon commented Dec 26, 2016

In lieu of overall rewrites, there is a crash with a null reference error.

Adding fix suggested by @sdudziak to deal with this in the short term (see #190 for more details)

A larger rewrite will be necesary to deal with Webpack 2 and typescript 2.1

Creating a fix based on s-panferov#190

I have not tested this fix, I'm contributing it for evaluation
@@ -211,6 +211,10 @@ function setupBabel(loaderConfig: LoaderConfig): any {
}

function applyDefaults(configFilePath: string, compilerConfig: TsConfig, loaderConfig: LoaderConfig) {
// HACK: adding in a blank initializer to stop loader from crashing,
// see s-panferov/awesome-typescript-loader#190 for more details
compilerConfig.raw.compilerOptions.exclude = compilerConfig.raw.compilerOptions.exclude || [];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the crash was in 2.2.4 and not in master so this fix doesn't apply. The line that was crashing isn't even here: compilerConfig.typingOptions.exclude = compilerConfig.typingOptions.exclude || [];

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants