Skip to content

Instantly share code, notes, and snippets.

@jwchang0206
Last active December 3, 2020 11:39
Show Gist options
  • Save jwchang0206/7a4adb7f80c57c487d91a9cb2eaf87b0 to your computer and use it in GitHub Desktop.
Save jwchang0206/7a4adb7f80c57c487d91a9cb2eaf87b0 to your computer and use it in GitHub Desktop.
Craco config for TypeScript
const CracoSwcPlugin = require('craco-swc');
module.exports = {
plugins: [
{
plugin: CracoSwcPlugin,
options: {
swcLoaderOptions: {
jsc: {
externalHelpers: true,
target: 'es5',
parser: {
syntax: 'typescript',
tsx: true,
dynamicImport: true,
exportDefaultFrom: true,
},
},
},
},
},
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment