Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

renarsvilnis-js-helpers

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

renarsvilnis-js-helpers

Collection of personal JavaScript helper function & React components

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Collection of personal JavaScript helper function & React components

React Components

  • DelayMount
  • FirstChildReactCSSTransitionGroup
  • ObjectFill
  • ObjectFit

Webpack

This collection includes helper functions for configuring Webpack, so that the bundled assets work under any domain/subdomain.

webpack.config.js

{
  output: {
    pathinfo: false
  },
  entry: {
    <filename>: [
      ...,
      `webpack-hot-middleware/client?dynamicPublicPath=true`, // NOTE: added only while developing
      path.join(__dirname, 'src/index.js')
    ]
  }

src/index.js

/**
 * As Webpack manages all assets, including iamges, videos, etc it needs to know
 * the url of the root, this can be set during build process in webpack-config
 * under "output.publicPath", but here to make webpack more "portable" we fetch
 * the url from the entry file through getCurrentScriptPath.
 *
 * @reference https://medium.com/@aviv.rosental/portable-bundle-with-webpack-d2eed216cd4c#.8d0ei927i
 * @reference https://github.com/webpack/webpack/issues/2776
 */
const getCurrentScriptPath = require('renarsvilnis-js-helpers/webpack/getCurrentScriptPath').default;
__webpack_public_path__ = getCurrentScriptPath() + '/'; // eslint-disable-line camelcase, no-undef

FAQs

Package last updated on 30 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc