uikit / uikit

A lightweight and modular front-end framework for developing fast and powerful web interfaces

Home Page:http://getuikit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LOG in hooks.js is not defined

manuelkleinert opened this issue · comments

UIkit Version

3.16.22

Actual Behavior

LOG in hooks.js is not defined

Steps to Reproduce the Problem

https://github.com/uikit/uikit/blob/develop/src/js/api/hooks.js

if I write the LOG lowercase it works.
log && log(instance, hook);

commented

@manuelkleinert If you're trying to compile UIkit from source in a build process (e.g. webpack), then you should globally define that variable. For example with webpack you could use the DefinePlugin:

new webpack.DefinePlugin({
  LOG: false
});

UIkit does the same in their builds, see: https://github.com/uikit/uikit/blob/develop/build/util.js#L88
If that helps, let me know and I'll close the ticket!

@aarongerig Thank you so works with Webpack.