How to use the razzle-dev-utils/logger.error function in razzle-dev-utils

To help you get started, we’ve selected a few razzle-dev-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jaredpalmer / after.js / packages / after / scripts / start.js View on Github external
process.env.INSPECT_ENABLED = true;
}

// Optimistically, we make the console look exactly like the output of our
// FriendlyErrorsPlugin during compilation, so the user has immediate feedback.
// clearConsole();
logger.start('Compiling...');
let after = {};

// Check for after.config.js file
if (fs.existsSync(paths.appAfterConfig)) {
  try {
    after = require(paths.appAfterConfig);
  } catch (e) {
    clearConsole();
    logger.error('Invalid after.config.js file.', e);
    process.exit(1);
  }
}

// Delete assets.json to always have a manifest up to date
fs.removeSync(paths.appManifest);

// Create dev configs using our config factory, passing in after file as
// options.
let clientConfig = createConfig('web', 'dev', after);
let serverConfig = createConfig('node', 'dev', after);

// Check if after.config has a modify function. If it does, call it on the
// configs we just created.
if (after.modify) {
  clientConfig = after.modify(
github jaredpalmer / razzle / packages / razzle / scripts / start.js View on Github external
function main() {
  // Optimistically, we make the console look exactly like the output of our
  // FriendlyErrorsPlugin during compilation, so the user has immediate feedback.
  // clearConsole();
  logger.start('Compiling...');
  let razzle = {};

  // Check for razzle.config.js file
  if (fs.existsSync(paths.appRazzleConfig)) {
    try {
      razzle = require(paths.appRazzleConfig);
    } catch (e) {
      clearConsole();
      logger.error('Invalid razzle.config.js file.', e);
      process.exit(1);
    }
  }

  // Delete assets.json to always have a manifest up to date
  fs.removeSync(paths.appManifest);

  // Create dev configs using our config factory, passing in razzle file as
  // options.
  let clientConfig = createConfig('web', 'dev', razzle, webpack);
  let serverConfig = createConfig('node', 'dev', razzle, webpack);

  // Compile our assets with webpack
  const clientCompiler = compile(clientConfig);
  const serverCompiler = compile(serverConfig);
github Val-Zhang / webpack-demo / src / scripts / start.js View on Github external
err => {
      if (err) {
        logger.error(err);
      }
    }
  );

razzle-dev-utils

Utilities and helpers for Razzle

MIT
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis

Similar packages