We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcea268 commit 4cc78b4Copy full SHA for 4cc78b4
src/index.ts
@@ -151,8 +151,10 @@ export default (opts: PluginOptions = {}): Plugin => {
151
},
152
async resolveId(id, importer, options) {
153
if (importer && !relativeImportRE.test(id) && !isAbsolute(id)) {
154
+ // For Vite 4 and under, skipSelf needs to be set.
155
+ const resolveOptions = { ...options, skipSelf: true }
156
const viteResolve: ViteResolve = async (id, importer) =>
- (await this.resolve(id, importer, options))?.id
157
+ (await this.resolve(id, importer, resolveOptions))?.id
158
159
let prevProjectDir: string | undefined
160
let projectDir = dirname(importer)
0 commit comments