Socket
Socket
Sign inDemoInstall

canopy-sofe-extensions

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canopy-sofe-extensions

canopy-sofe-extensions is an npm package that is part of canopy common dependencies. It does two things:


Version published
Weekly downloads
46
increased by27.78%
Maintainers
4
Weekly downloads
 
Created
Source

canopy-sofe-extensions

canopy-sofe-extensions is an npm package that is part of canopy common dependencies. It does two things:

  1. Provides special sofe overrides of integ, stage, prod, or simply a port number (for localhost)
  2. Exports a function, calculatePublicPath, that helps you set the webpack public path for a sofe override correctly. Setting the public path correctly is required for doing code splitting in a sofe service.

Example usage

// In your webpack entry file
import {calculatePublicPath} from 'canopy-sofe-extensions'

__webpack_public_path__ = calculatePublicPath("name-of-my-sofe-service")

If you need to call dynamic import() immediately in a file that gets executed before the entry file, try the following

// In your webpack entry file
import './set-public-path.js' // do this import at the very very top to ensure it is executed first
// In set-public-path.js
import {calculatePublicPath} from 'canopy-sofe-extensions'

__webpack_public_path__ = calculatePublicPath("name-of-my-sofe-service")

FAQs

Package last updated on 05 Jul 2018

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