Skip to content

core-js-builder would throw if no polyfill is needed after browserslist query #822

@shrinktofit

Description

@shrinktofit
const fs = require('fs');
const filename = './my-core-js-bundle.js';
require('core-js-builder')({
  modules: ['es'],        // modules / namespaces, by default - all `core-js` modules
  blacklist: [], // blacklist of modules / namespaces, by default - empty list
  targets: 'chrome 80',                               // optional browserslist query
  filename,              // optional target filename, if it's missed a file will not be created
}).then(code => {                                  // code of result polyfill
console.log(code);
  fs.writeFileSync(filename, code);
}).catch(error => {
  // WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
  console.error(error);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy