We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rollup-plugin-rename-node-modules is not generating source map correctly. For example:
rollup-plugin-rename-node-modules
{ "type": "module", "scripts": { "build": "rollup -c" }, "dependencies": { "colord": "^2.9.3" }, "devDependencies": { "@rollup/plugin-node-resolve": "^15.0.1", "rollup": "^2.79.1", "rollup-plugin-rename-node-modules": "^1.3.1" } }
import nodeResolve from '@rollup/plugin-node-resolve'; import renameNodeModules from 'rollup-plugin-rename-node-modules'; export default { plugins: [ renameNodeModules(), nodeResolve(), ], input: 'index.js', output: { dir: 'dist', entryFileNames: '[name].mjs', format: 'esm', sourcemap: true, preserveModules: true, exports: 'named', }, };
import { colord } from 'colord'; // Import any external package console.log(colord(0xFF0000));
Run npm run build, and the result dist/index.mjs.map is:
npm run build
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],/* ... */}
This is obviously invalid. The correct source map should be looks like:
{"version":3,"file":"index.mjs","sources":["../index.js"],"sourcesContent":[/* ... */],/* ... */}
This issue is caused by this line of code:
rollup-plugin-rename-node-modules/src/index.ts
Line 106 in 16f0143
generateMap need argument such as { source: '...', file: '...', includeContent: true } to generate the correct source map.
generateMap
{ source: '...', file: '...', includeContent: true }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
rollup-plugin-rename-node-modules
is not generating source map correctly. For example:package.json
rollup.config.js
index.js
Run
npm run build
, and the result dist/index.mjs.map is:This is obviously invalid. The correct source map should be looks like:
This issue is caused by this line of code:
rollup-plugin-rename-node-modules/src/index.ts
Line 106 in 16f0143
generateMap
need argument such as{ source: '...', file: '...', includeContent: true }
to generate the correct source map.The text was updated successfully, but these errors were encountered: