Created
March 25, 2018 01:20
-
-
Save erictherobot/1b71ddb38ccde3c986ff8cb6a34d9b45 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
webpack(config, options) { | |
const { dir, defaultLoaders } = options | |
config.resolve.extensions.push('.ts', '.tsx') | |
config.module.rules.push({ | |
test: /\.+(ts|tsx)$/, | |
include: [dir], | |
exclude: /node_modules/, | |
use: [ | |
defaultLoaders.babel, | |
{ loader: 'ts-loader', options: { transpileOnly: true } } | |
] | |
}) | |
return config | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment