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

vite-plugin-cdn-import

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-cdn-import - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

18

dist/index.js

@@ -242,14 +242,25 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __defProp = Object.defineProperty;

});
const externalLibs = Object.keys(externalMap);
const plugins = [
{
name: "vite-plugin-cdn-import",
config(config, {command}) {
config(_, {command}) {
const userConfig = {
build: {
rollupOptions: {}
}
};
if (command === "build") {
isBuild = true;
userConfig.build.rollupOptions = {
external: [...externalLibs],
plugins: [_rolluppluginexternalglobals2.default.call(void 0, externalMap)]
};
} else {
isBuild = false;
}
return userConfig;
},
transformIndexHtml(html) {
const cssCode = data.map((v) => v.cssList.map((css) => `<link href="${css}" rel="stylesheet">`).join("\n")).filter((v) => v).join("\n");
const cssCode = !isBuild ? "" : data.map((v) => v.cssList.map((css) => `<link href="${css}" rel="stylesheet">`).join("\n")).filter((v) => v).join("\n");
const jsCode = !isBuild ? "" : data.map((p) => p.pathList.map((url) => `<script src="${url}"></script>`).join("\n")).join("\n");

@@ -261,5 +272,2 @@ return html.replace(/<\/title>/i, `</title>${cssCode}

];
if (isBuild) {
plugins.push(_rolluppluginexternalglobals2.default.call(void 0, externalMap));
}
return plugins;

@@ -266,0 +274,0 @@ }

{
"name": "vite-plugin-cdn-import",
"version": "0.3.3",
"version": "0.3.4",
"description": "Import packages from CDN for the vite plugin",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

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