-
Notifications
You must be signed in to change notification settings - Fork 40
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
os
doesn't work?
#24
Comments
Due to the issue on the rollup: calvinmetcalf/rollup-plugin-node-builtins#24
your type-script build turns your imports into requires so this is totally not related to this particular plugin but more generally combining typescript and rollup |
It seems like this is more related to Thanks. I ran this is transpiled directly by I want to bundle the |
rollup is designed for bundling es6 modules the problem you have is tsc is transpiling the syntax AND the import statements into es5, you want the syntax but not the import statements transpiled and I belive you can use the typescript plugin to do so |
Due to the issue on the rollup: calvinmetcalf/rollup-plugin-node-builtins#24
I'm using
node-globals
andnode-builtins
to build my bundle.In the code, I use
import { release } from 'os'
:https://github.com/unional/aurelia-logging-color/blob/rollup-require-issue/src/environments.ts
When I bundle and load the script on the browser, it complains:
You can see the error by cloning the repo:
When I use
webpack
, it is working correctly.Here is the
rollup
configuration:https://github.com/unional/aurelia-logging-color/blob/rollup-require-issue/rollup.config.global.js
Here is the
webpack
configuration:https://github.com/unional/aurelia-logging-color/blob/rollup-require-issue/webpack.config.global.js
Thanks. 🌷
UPDATE: pointing to
rollup-require-issue
branch., add repro stepsThe text was updated successfully, but these errors were encountered: