Last active
June 8, 2020 00:38
-
-
Save educartoons/0a194498ba811be842e04fed7fa7aa4f 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
| const { | |
| override, | |
| getBabelLoader, | |
| addWebpackModuleRule | |
| } = require('customize-cra'); | |
| module.exports = (config, env) => { | |
| const babelLoader = getBabelLoader(config); | |
| return override( | |
| addWebpackModuleRule( | |
| test: /\.worker\.ts$/, | |
| use: [ | |
| { | |
| loader: 'worker-loader', | |
| }, | |
| { | |
| loader: babelLoader.loader, | |
| options: { | |
| babelLoader.options | |
| } | |
| } | |
| ] | |
| ) | |
| )(config, env) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment