Skip to content

Commit

Permalink
chore(mako): add debug notice for local builds (#1743)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc authored Jan 8, 2025
1 parent f2603f0 commit dfe3164
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/mako/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import fs from 'fs';
import os from 'os';
import path from 'path';
import chalk from 'chalk';
import { omit } from 'lodash';
import resolve from 'resolve';
import { type Options } from 'sass';
Expand Down Expand Up @@ -42,6 +43,13 @@ function blockStdout() {
export async function build(params: BuildParams) {
blockStdout();

// if mako is running in local build, print a notice
if (!__dirname.includes('node_modules')) {
console.log(
chalk.red('NOTICE: Mako is running in DEBUG mode with local build...'),
);
}

params.config.plugins = params.config.plugins || [];
params.config.resolve = params.config.resolve || {};

Expand Down

0 comments on commit dfe3164

Please sign in to comment.