Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Webpack plugin for transcompilig final bundles so they support legacy browsers

License

Notifications You must be signed in to change notification settings

uofa/targets-webpack-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

targets-webpack-plugin npm

A babel plugin for transcompilig final bundles so they support legacy browsers.

This plugin runs babel and rollup only once per asset, at the end of the compilation process.

Installation

npm install --save-dev targets-webpack-plugin

or

yarn add --dev targets-webpack-plugin

Usage

Add TargetsPlugin to the list of plugins.

// next.config.js
const TargetsPlugin = require("targets-webpack-plugin");

module.exports = {
  webpack: function (config, { dev }) {
    if (!dev) {
      config.plugins.push(new TargetsPlugin({
        browsers: ["last 2 versions", "chrome >= 41"]
      }))
    }
    return config
  }  
}

License

MIT

About

Webpack plugin for transcompilig final bundles so they support legacy browsers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%