Open tshemsedinov opened 6 years ago
@tshemsedinov, I've stacked with warning building library for browser:
WARNING in ./node_modules/metarhia-common/common.js
20:35-42 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
@ ./node_modules/metarhia-common/common.js
@ ./gs.js
I think it can be resolved with refactoring:
const submodules = [
'utilities', // Common utilities
'math', // Math common function
].map(path => './lib/' + path).map(require);
to
require('./lib/utilities');
require('./lib/math');
LocalStorageProvider
is a class for client-side web applications implementsStorageProvider
interface and connectsGlobalStorage
tolocalstorage
(Web Storage API Interface), see specs: https://developer.mozilla.org/ru/docs/Web/API/Window/localStorage