-
Notifications
You must be signed in to change notification settings - Fork 28
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
Remove unneeded babel plugins so that shipped addon code is way smaller and easier to debug without sourcemaps #231
Conversation
according to embroider-build/ember-auto-import#601, this would make no difference? Or, would it be correct to say, that it makes no difference for "classic build" via Ember CLI and would just work for apps built with Embroider? |
It's a separate problem. That issue and classic vs embroider aren't a concern for the compilation of a library -- it is true that the app's / consumer's babel will run over this code again, but addon maintainers will want less to maintain, and fewer babel plugins is always good :D |
@NullVoxPopuli thanks for confirming the assumption! |
f6980d3
to
f1c53de
Compare
TS tests are failing atm -- passing on |
@@ -89,17 +89,12 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) { | |||
'template-registry.js.map', | |||
]); | |||
|
|||
expect(distContents.hashed.length).toBe(4); | |||
expect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we no longer emit rollup helpers
expect( | ||
distContents.hashed | ||
.filter((file) => file.includes('template-only')) | ||
.map((file) => file.split('.js')[1]), | ||
).to.deep.equal(['', '.map'], 'the template-only component is emitted with a source map'); | ||
).to.deep.equal(['', '.map'], 'the template-only (private) component is emitted with a source map'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just clarifying here that this assertion is ensuring that private components are still present in the output
@@ -33,14 +33,12 @@ | |||
"prepack": "rollup --config" | |||
}, | |||
"dependencies": { | |||
"@embroider/addon-shim": "^1.0.0" | |||
"@embroider/addon-shim": "^1.0.0", | |||
"decorator-transforms": "^1.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NullVoxPopuli out of curiosity why would it go to dependencies
? Is it intentional or mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it has a tiny runtime module that needs to be imported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Sourcemaps are, ofc, still very good, and hi-fi)
Changes:
Details: https://github.com/ef4/decorator-transforms