mikado
mikado copied to clipboard
Issue when used together with Webpack?
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?
May be it's the problem after packaging. Please try with out webpack.
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...
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.