Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: @rollup/plugin-node-resolve incorrectly parses module paths during bundling #1891

Unanswered
Hoshino-Yumetsuki asked this question in Q&A
Discussion options

@rollup/plugin-node-resolve incorrectly parses module paths during bundling, resulting in malformed import paths in the output JavaScript file.

It will generate the import with the path of the node_modules like

import { h as e } from "E:ProjectsRMPR\node_moduleskoishilibindex.mjs";
e(``);
var t = e;
export { t as default };

minimal reproduce

import { h } from 'koishi'
h('')
export default h
}
main().catch(error => console.error('Error in main function:', error))
import resolve from '@rollup/plugin-node-resolve'
export default {
 input: 'src/main.ts',
 output: {
 file: 'dist/main.js',
 minify: true
 },
 external: [/node_modules/],
 platform: 'node',
 plugins: [resolve()]
}
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #1890 on August 06, 2025 18:32.

AltStyle によって変換されたページ (->オリジナル) /