Skip to content

Instantly share code, notes, and snippets.

@erictherobot
Created March 25, 2018 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erictherobot/1b71ddb38ccde3c986ff8cb6a34d9b45 to your computer and use it in GitHub Desktop.
Save erictherobot/1b71ddb38ccde3c986ff8cb6a34d9b45 to your computer and use it in GitHub Desktop.
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