How to have the output be a bundle rather than having it require other modules? #5241
-
Here's my "rollup.config.js":
I would expect that "./dist/entry-main.min.js" would be a one-file bundle of all of "./app/main.ts" + all the modules it imports. Instead, "./dist/entry-main.min.js" contains a bunch of
I'm a bit puzzled, as I feel like what I'm trying to achieve should be very straightforward when using a bundler 😅 Thanks for the help 🙏 Edit 1 Just in case, I have tried using the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The .ts files were compiled to CJS as per my "tsconfig" and Rollup doesn't seem to handle CJS files. I had to specify |
Beta Was this translation helpful? Give feedback.
The .ts files were compiled to CJS as per my "tsconfig" and Rollup doesn't seem to handle CJS files. I had to specify
"module": "es6"
or above in my tsconfig to generate es modules that Rollup can work with.