diff --git a/CHANGELOG.md b/CHANGELOG.md index 68eac9d..9b1a396 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.1.0 + +### Features + +- Expose resolve. + ## 1.0.0 A stable version. diff --git a/docs/Q&A.md b/docs/Q&A.md index 1b419d7..b1c3b75 100644 --- a/docs/Q&A.md +++ b/docs/Q&A.md @@ -46,3 +46,7 @@ moudles: [{ name: "element-plus", aliases: ["es", "lib"] }]; > How to use it with React? - Usually most of libraries will provide jsdelivr or unpkg filed but if isn't. You should set `relativeModule` for it. + +> Why i can't find any module? + +- If you‘re a pnpm user you need to explicitly install the peer dependencies diff --git a/package.json b/package.json index c0ff1cb..84824a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vite-plugin-cdn2", - "version": "1.0.0", + "version": "1.1.0", "description": "A Vite plugin that allowed you replace module with CDN", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/index.ts b/src/index.ts index 99af908..731d3a3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -122,7 +122,9 @@ function cdn(opts: CDNPluginOptions = {}): Plugin[] { return transformWithBabel(code, api.dependency) }, transformIndexHtml(html) { + debug('start transformIndexHtml') const inject = createInjectScript(scanner.dependencies, resolve) + debug('transformIndexHtml Done', inject.tagDescriptors) return { html, tags: inject.tagDescriptors