Skip to content

Instantly share code, notes, and snippets.

@arturovt
Created February 28, 2021 02:09
Show Gist options
  • Save arturovt/2f8a993609a354b5e623b638ff44cba8 to your computer and use it in GitHub Desktop.
Save arturovt/2f8a993609a354b5e623b638ff44cba8 to your computer and use it in GitHub Desktop.
export default (config: webpack.Configuration) => {
if (config.mode === 'production') {
const transformation = require('@ngtools/webpack/src/ivy/transformation');
const createAotTransformers = transformation.createAotTransformers;
transformation.createAotTransformers = function () {
const transformers: ts.CustomTransformers = createAotTransformers(...arguments);
transformers.before!.push(replaceIsPlatformCallsTransformerFactory);
return transformers;
};
}
return config;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment