(tailwind) Use TAILWIND_MODE environment variable to activate purge on build

This commit is contained in:
sercan 2021-05-19 14:45:30 +03:00
parent 3d09241c64
commit ee86dc6245

View File

@ -74,11 +74,7 @@ const config = {
darkMode : 'class',
important : true,
purge : {
// Until AngularCLI team provides a better way to distinguish between
// development and production, we will decide whether to purge or not
// by looking at the process arguments. If there is a "build" argument
// with the "ng" command then we will enable the purge.
enabled: process && process.argv && process.argv.find(arg => arg.includes('ng')) && process.argv.indexOf('build') !== -1,
enabled: process.env.TAILWIND_MODE === 'build',
content: ['./src/**/*.{html,scss,ts}'],
options: {
safelist: {