Sha256: ae7402117b632ef9e082a1cf4ea555c3acc750265b91b3ff57acc40be7b4584c

Contents?: true

Size: 933 Bytes

Versions: 42

Compression:

Stored size: 933 Bytes

Contents

module Isomorfeus
  module Preact
    module Imports
      def self.add
        Isomorfeus.add_web_js_import('preact/debug') if Isomorfeus.development?
        Isomorfeus.add_common_js_import('preact', 'Preact', '*')
        Isomorfeus.add_common_js_import('preact/hooks', 'PreactHooks', '*')
        Isomorfeus.add_common_js_import('wouter-preact', nil, ['Router', 'Link', 'Redirect', 'Route', 'Switch'])

        Isomorfeus.add_ssr_js_import('preact-render-to-string', 'Preact', ['render'], nil, 'renderToString')
        Isomorfeus.add_ssr_js_import('wouter-preact/static-location', 'staticLocationHook')

        Isomorfeus.add_web_js_import('wouter-preact/use-location', 'locationHook')

        if Dir.exist?(Isomorfeus.app_root)
          Isomorfeus.add_common_ruby_import('isomorfeus_loader') if File.exist?(File.join(Isomorfeus.app_root, 'isomorfeus_loader.rb'))
        end
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
isomorfeus-preact-10.6.49 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.48 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.47 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.46 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.45 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.44 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.43 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.42 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.41 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.40 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.39 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.38 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.37 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.36 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.35 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.34 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.33 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.32 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.31 lib/isomorfeus/preact/imports.rb
isomorfeus-preact-10.6.30 lib/isomorfeus/preact/imports.rb