Parcel 2 ready for production? #4422
-
Parcel is just great. However, I can't use parcel-bundler because I use react-bootstrap. Parcel 2 works just fine with react-bootstrap. My sense is to use Parcel 2 despite it being alpha for my production release. Either it will work or some testing will show it has problems. It would be nice to get some guidance of issues, things to look for, concerns etc. Please don't force me back to other build systems. My build size is just great, its easy to use etc. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 8 replies
-
You are free to use it in production at your own risk, the main remaining issues are stability, caching and potential breaking changes. Also documentation is pretty much non existent for Parcel 2 which is also something that might be annoying sometimes... But we'll be working on that soonish So as long as you're not writing any custom plugins and keep in mind that you might have to remove cache on a weird bug you should be fine. These issues should get resolved before a stable release. |
Beta Was this translation helpful? Give feedback.
-
You might want to pin your version to a stable one rather than |
Beta Was this translation helpful? Give feedback.
-
@dandv Good thought, thanks much for the idea. @DeMoorJasper - I'm having a hard time finding the doc for how to import an svg file, in parcel-bundler this worked
Would appreciate ideas. Other than that (and pinning a version) 2.0 seems good. Thanks! |
Beta Was this translation helpful? Give feedback.
-
We have named pipelines in Parcel 2 this removed the implicit url importing you now have to use |
Beta Was this translation helpful? Give feedback.
-
Looks like a few of the "loaders" (unsure if that's the right terminology) are not working on v2+? I just tried with a Rust file and got an error? |
Beta Was this translation helpful? Give feedback.
-
I ran into the same issue as @cdbattags . I see #3365 is tracking Rust/Parcel 2 but there hasn't been an update in a bit. Is the Rust integration still planned for Parcel 2? |
Beta Was this translation helpful? Give feedback.
-
@D1plo1d we're still planning to support rust but we don't have any Rust users/experts in the Parcel core team currently so it's probably best if someone external with better knowledge of rust would contribute the rust support like what happened in Parcel 1. At some point we will probably port the old Parcel 1 rust transformer to Parcel 2 if no-one does. We're also mainly focused on getting the current version stable and ready for a beta and stable version. |
Beta Was this translation helpful? Give feedback.
-
Hey, hi, I'm the author of parcel-plugin-wasm-pack (on npm here). As I mentioned in #3365 (comment) I'd be interested in contributing to Rust/wasm support in Parcel 2 (either as a plugin or as part of the official project), but I'm a bit confused as to where/how to start. There's a These integration tests all mention wasm somewhere in them, but where they do they're all
There appear to be several
Anyway, I guess this is just my way of getting the lay of the land here. Looking in packages/core/integration-tests/test/integration I see several sort of "project fixtures" … the
I think both these cases don't really fit with how wasm-pack wants to treat crates being turned into wasm modules, so I guess I'm going to propose a third case (and maybe even suggest deprecating the first two? … the behavior seems surprising or unclear to me, though I'd be happy to learn about what use cases these approaches support).
Okay, so the base cases I think would look like these:
I might be biased here, these are pretty much the examples I set up in my Parcel 1 plugin. The new implementation would be different in that it wouldn't let an entry import diff --git a/examples/single/src/index.js b/examples/single/src/index.js
index b055b85..fd4a856 100644
--- a/examples/single/src/index.js
+++ b/examples/single/src/index.js
@@ -1,2 +1,2 @@
-import { run } from './lib.rs';
+import { run } from '../Cargo.toml';
run(); … and the multiple: diff --git a/examples/multiple/src/index.js b/examples/multiple/src/index.js
index d1cc5fe..c31baea 100644
--- a/examples/multiple/src/index.js
+++ b/examples/multiple/src/index.js
@@ -1,5 +1,5 @@
-import { hello } from '../crates/hello/src/lib.rs';
-import { world } from '../crates/world/src/lib.rs';
+import { hello } from '../crates/hello/Cargo.toml';
+import { world } from '../crates/world/Cargo.toml';
hello();
world(); I think this'd actually work with my plugin as is, but importing Okay, sorry this is getting so long, but if you're still with me, I think I'm getting closer to an idea of the solution. Wasm-pack will generate some files using it's ├── README.md
├── abc.d.ts
├── abc.js
├── abc_bg.d.ts
├── abc_bg.js
├── abc_bg.wasm
└── package.json All we're really interested in are import * as wasm from './abc_bg.wasm';
export * from './abc_bg.js'; This is sort of the way of the future, for when ES module integration lands. For now we've got to do the imperative way, so in It's a bit of juggling, but I think it's the right thing to do for the time being … and unfortunately we're not quite done. At this point the entry module is trying to access members of a wasm module, but that wasm module is wrapped up in the loader promise. In my plugin's implementation a packager is added to check if bundles include wasm assets, and if they do it inserts a new entry module that wraps those promises in a More juggling, but again, I think it's the right thing to do … so, I'm really tired now, but I guess my questions are:
Anyway, I hope that makes sense. Thanks in advance for your thoughtful consideration. Looking forward to getting this working! |
Beta Was this translation helpful? Give feedback.
You are free to use it in production at your own risk, the main remaining issues are stability, caching and potential breaking changes. Also documentation is pretty much non existent for Parcel 2 which is also something that might be annoying sometimes... But we'll be working on that soonish
So as long as you're not writing any custom plugins and keep in mind that you might have to remove cache on a weird bug you should be fine. These issues should get resolved before a stable release.