sheerun / targets-webpack-plugin

Webpack plugin for transcompilig final bundles so they support legacy browsers
MIT License
15 stars 4 forks source link

Doesn't work with C3js #6

Open NightOwlPrgmr opened 4 years ago

NightOwlPrgmr commented 4 years ago

I have been using C3js in a project for a couple of years now and the donut chart created by C3 has always worked in IE11. A few days ago someone on my team created a new Vue component that needed this targets-webpack-plugin for one reason or another.

Since this was added the donut charat no longer displays and throws an error: Object Error: unknown type: s

I'm also using Laravel and Laravel Mix, here's my webpack config for this plugin:

const mix = require('laravel-mix');

if (mix.inProduction()) {

    require('laravel-mix-polyfill');
    const TargetsPlugin = require('targets-webpack-plugin');

    mix.webpackConfig({
        plugins: [
            new TargetsPlugin({
                browsers: ['last 2 versions', 'IE 11'],
            }),
        ]
    }).polyfill({
            enabled: true,
            targets: false
    });
}

I've been unsuccessful in only applying this plugin to certain assets that need them. I've also not been able to get C3 to work with this plugin.

Any help would be appreciated.