how to build dependencies #2905
Unanswered
christophe-g
asked this question in
Troubleshooting
Replies: 2 comments 1 reply
-
Yes! See: https://www.snowpack.dev/reference/configuration#packageoptions.rollup |
Beta Was this translation helpful? Give feedback.
1 reply
-
@FredKSchott - I am afraid I still need some help here - I am unable to perform this simple requirement, hmm. This is the snowpack.config.js I was hoping would work packageOptions: {
rollup: {
plugins: [
require('@rollup/plugin-babel').default({
babelHelpers: 'inline',
plugins: [
['@babel/plugin-proposal-decorators', { 'decoratorsBeforeExport': true }],
]})
], Packages with @decorators still make the build fail; [snowpack] ! building source files...
[snowpack] ✔ build complete [9.74s]
[snowpack] ! building dependencies...
[snowpack] Failed to load ../litElement/preignition-form/src/pfo-live-data.js
Unexpected character '@' (4:0) in /home/christophe/Programming/Polymer/litElement/preignition-form/src/pfo-live-data.js
[snowpack] Install failed.
ERROR Command failed with exit code 1.
Alternatively, this fails as well rollup: {
plugins: [
require('@rollup/plugin-babel').default({
babelHelpers: 'inline',
presets: [
"@babel/preset-typescript"
]
], As babel is new to me, I might miss smth completely trivial! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This should be pretty straightforward.
I have some linked dependencies (which I actually tread as source files, but they are shared across other libraries) containing
@decorators
.For instance:
That work all well when in the dev environment (even HMR is fine).
Now this is what I (unsurprisingly) get when I build the app:
Is there a way to instruct the build process to transform some dependencies ?
Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions