Skip to content

Commit

Permalink
fix: tslib error (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoloJiang authored Nov 23, 2021
1 parent 6575dbd commit 0dce679
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/plugin-rax-app/src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = (api, { target, babelConfigOptions, progressOptions = {} }) =>
// Only save target code
const keepPlatform = ['ssr', 'document'].includes(target) ? 'node' : target;
['jsx', 'tsx'].forEach((ruleName) => {
enhancedWebpackConfig.module
config.module
.rule(ruleName)
.use('platform-loader')
.loader(require.resolve('rax-platform-loader'))
Expand All @@ -145,6 +145,9 @@ module.exports = (api, { target, babelConfigOptions, progressOptions = {} }) =>
});
});
}

// TODO: hack for tslib wrong exports field https://github.com/microsoft/tslib/issues/161
config.resolve.alias.set('tslib', 'tslib/tslib.es6.js');
});

return enhancedWebpackConfig;
Expand Down

0 comments on commit 0dce679

Please sign in to comment.