mikado icon indicating copy to clipboard operation
mikado copied to clipboard

Issue when used together with Webpack?

Open mrft opened this issue 4 years ago • 2 comments

Hi When trying to use Mikado inside a webpack-packaged application, I see the following error on the browser's console: Uncaught ReferenceError: SUPPORT_EVENTS is not defined which seems plausible since the first 3 lines of event.js seem to be

import Mikado from "./mikado.js";

if(SUPPORT_EVENTS){

It doesn't matter if I use const Mikado = require('mikado'); or import Mikado from 'mikado'

Is this some sort of bug, or is it just me not understanding how this thing works or how it is supposed to be used?

mrft avatar Sep 24 '20 20:09 mrft

May be it's the problem after packaging. Please try with out webpack.

Dan-Do avatar Sep 25 '20 14:09 Dan-Do

It works without webpack.

After that I realized that this might work with webpack then (and it does): require('mikado/dist/mikado.min.js');

That feels a little bit strange, but it gets the job done...

mrft avatar Sep 26 '20 21:09 mrft

Compiler flags was improved, they are imported by ES6 module loader. Also there are more versions available in the dist folder. Just pick one from there and don't use the src folder, which needs a compilation which solves the compiler flags.

ts-thomas avatar Jan 05 '24 13:01 ts-thomas