-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
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
code splitting broken on Windows #169
Comments
Could you try the same thing with plain rollup, is it supposed to work? (turn ts into js manually and remove rpt2 from plugins) |
This is a working well-tested feature in Rollup. Ok
case2:
Result: output for case1 and case2 is identical (see below) rollup.config.jsimport resolve from 'rollup-plugin-node-resolve';
export default {
// NOTE: object here
input: {
'my-lib': 'src/main.js',
'my-tools': 'src/tools.js'
},
output: {
dir: 'dist',
format: 'esm'
},
plugins: [
resolve()
]
}; outputdist/my-tools.js function myFn() {
console.log('Hello World!');
}
export { myFn }; dist/my-lib.js import { myFn } from './my-tools.js';
console.log(myFn()); |
I see the problem, rollup doesn't normalize paths when using them as keys for code splitting. Workaround is to add I'll open rollup bug. |
It seems rollup is not going to fix. |
@igisev can you use |
What happens and why it is wrong
Briefly:
Code splitting is not supported now
Versions
rollup.config.js
tsconfig.json
files
src/tools.ts
src/main.ts
plugin output
dist/my-tools.js OK
dist/my-lib.js WRONG
expected output
dist/my-lib.js
The text was updated successfully, but these errors were encountered: