You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@plotly/webpack-dash-dynamic-import

Package Overview
Dependencies
Maintainers
19
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plotly/webpack-dash-dynamic-import - npm Package Compare versions

Comparing version

to
1.1.3-rc1

plotly-webpack-dash-dynamic-import-1.1.3-rc1.tgz

2

package.json
{
"name": "@plotly/webpack-dash-dynamic-import",
"version": "1.1.2",
"version": "1.1.3-rc1",
"description": "Webpack Plugin for Dynamic Import in Dash",

@@ -5,0 +5,0 @@ "repository": {

@@ -13,9 +13,13 @@ const fs = require('fs');

/**
* This code is injected as-is in the webpack artifact and must be ES5 compatible to work in all scenarios.
* This will not get transpiled.
*/
const resolveImportSource = () => `\
const getCurrentScript = function() {
let script = document.currentScript;
var getCurrentScript = function() {
var script = document.currentScript;
if (!script) {
/* Shim for IE11 and below */
/* Do not take into account async scripts and inline scripts */
const scripts = Array.from(document.getElementsByTagName('script')).filter(function(s) { return !s.async && !s.text && !s.textContent; });
var scripts = Array.from(document.getElementsByTagName('script')).filter(function(s) { return !s.async && !s.text && !s.textContent; });
script = scripts.slice(-1)[0];

@@ -27,3 +31,3 @@ }

const isLocalScript = function(script) {
var isLocalScript = function(script) {
return /\\\/_dash-component-suites\\\//.test(script.src);

@@ -34,3 +38,3 @@ };

get: (function () {
let script = getCurrentScript();
var script = getCurrentScript();

@@ -45,8 +49,8 @@ var url = script.src.split('/').slice(0, -1).join('/') + '/';

const __jsonpScriptSrc__ = jsonpScriptSrc;
var __jsonpScriptSrc__ = jsonpScriptSrc;
jsonpScriptSrc = function(chunkId) {
let script = getCurrentScript();
let isLocal = isLocalScript(script);
var script = getCurrentScript();
var isLocal = isLocalScript(script);
let src = __jsonpScriptSrc__(chunkId);
var src = __jsonpScriptSrc__(chunkId);

@@ -57,4 +61,4 @@ if(!isLocal) {

const srcFragments = src.split('/');
const fileFragments = srcFragments.slice(-1)[0].split('.');
var srcFragments = src.split('/');
var fileFragments = srcFragments.slice(-1)[0].split('.');

@@ -61,0 +65,0 @@ fileFragments.splice(1, 0, ${getFingerprint()});