Skip to content

Instantly share code, notes, and snippets.

@jwchang0206
Created December 3, 2020 11:40
Show Gist options
  • Select an option

  • Save jwchang0206/f01208b42f09dc5ea02169f7aebf643d to your computer and use it in GitHub Desktop.

Select an option

Save jwchang0206/f01208b42f09dc5ea02169f7aebf643d to your computer and use it in GitHub Desktop.

Revisions

  1. jwchang0206 created this gist Dec 3, 2020.
    23 changes: 23 additions & 0 deletions craco.config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    const CracoSwcPlugin = require('craco-swc');

    module.exports = {
    plugins: [
    {
    plugin: CracoSwcPlugin,
    options: {
    swcLoaderOptions: {
    jsc: {
    externalHelpers: true,
    target: 'es5',
    parser: {
    syntax: 'ecmascript',
    jsx: true,
    dynamicImport: true,
    exportDefaultFrom: true,
    },
    },
    },
    },
    },
    ],
    };