How to use the @craco/craco.whenDev function in @craco/craco

To help you get started, we’ve selected a few @craco/craco 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 gsoft-inc / craco / recipes / use-an-https-dev-server / craco.config.js View on Github external
const path = require("path");
const fs = require("fs");

const { whenDev } = require("@craco/craco");

module.exports = {
    devServer: whenDev(() => ({
        https: true,
        pfx: fs.readFileSync(path.resolve("./localhost.pfx")),
        pfxPassphrase: "temp123!"
    }))
};

@craco/craco

Create React App Configuration Override, an easy and comprehensible configuration layer for create-react-app.

Apache-2.0
Latest version published 1 year ago

Package Health Score

68 / 100
Full package analysis