menu

Parcel

📦🚀 Blazing fast, zero configuration web application bundler

Channels
Chat
view-forward
# All channels
view-forward
# general
view-forward
# announcements
view-forward
# contributing
view-forward
# documentation
view-forward
# parcel2
view-forward
# plugins
view-forward
# rust
view-forward
Team
Posts
Chat
Members
Info
Show previous messages

October 22, 2019 at 9:08pm
Well it works if I manually put pdf.js and pdf-worker.js into dist/. But that seems wrong. I can't seem to find another way though.
  • reply
  • like

October 24, 2019 at 8:32am
hey hey. I don't get TypeScript type errors when compiling my project with Parcel. I have a repository here: https://github.com/muelli/parcel-test it should show the problem after a yarn install; yarn run parcel build index.html I appreciate any hints regarding the use of TypeScript.
  • reply
  • like

October 24, 2019 at 2:40pm
Hey! I'm writing a Parcel 2 transformer and have issues withaddIncludedFile. Files added seem to be picked up by parcel, but it does not seem to watch them. If I modify my main file, parcel rebuilds - but when I change one of the included files it does not.
This is also the case with the already existing pug transformer where included files do not trigger a rebuild. Is my local setup broken, is addIncludedFile broken or do I have a major misunderstanding how this is supposed to work?
  • reply
  • like

December 11, 2019 at 1:27pm
Hello, there! Bogdan from CodeSandbox here, is there a maintainer around I can chat with for 5 minutes?
  • reply
  • like

January 3, 2020 at 6:03pm
Hello! I want to inline svg files with parcel 2 and it works when importing them via bundle-text:... url, but doesn't when I configure it to happen automatically in .parcelrc with "*.svg": ["/transformer-inline-string"]. I need this because the svg imports are in node_modules
Edited
  • reply
  • like

January 19, 2020 at 1:29pm
what's the current parcel 2 approach to configure a combined dev setup outputting both a node.js server/api bundle and a react client bundle ? using the programmatic api ? or to run two parcel projects separate manually ? or ?
Edited
  • reply
  • like
guess I'm looking for something similar to a webpack hot-middleware multi-compiler setup for parcel2. The need is a setup which can produce both client and server with CLIENT (PWA with code splitting, workers, react, styled-components, ...) SERVER (SSR with renderToNodeStream, ...) with multiple entries and targets. And be flexible for more like webpack. Zero Config is not important, we want to control our setup and be able to do what we need to do.
Edited
  • reply
  • like

February 17, 2020 at 12:51pm
Hi! Can you share a sample how to debug a custom plugin? I suppose I have to create a Parcel instance with my test. Am I on the right way? How can I pass my plugin there?
  • reply
  • like

February 21, 2020 at 3:56am
Hi! Can you share a sample how to debug a custom plugin? I suppose I have to create a Parcel instance with my test. Am I on the right way? How can I pass my plugin there?
OK. I'm fine. It seems it's more simple that I think. But as it turned out, I need to write part of the code on top of the bundle. I see in the examples that it's overwrought the whole file there. It's the right way?
  • reply
  • like

March 2, 2020 at 4:17am
Hi! Can you share a sample how to debug a custom plugin? I suppose I have to create a Parcel instance with my test. Am I on the right way? How can I pass my plugin there?
I have spent a whole day to figure this out. The easiest way is to import {bundle} from '/test-utils' and then use the 'bundle' method from it. However, the maintainers forgot to publish this package to npm :-( I have created an issue for that: https://github.com/parcel-bundler/parcel/issues/4241
Edited
  • reply
  • like
I have spent a whole day to figure this out. The easiest way is to import {bundle} from '/test-utils' and then use the 'bundle' method from it. However, the maintainers forgot to publish this package to npm :-( I have created an issue for that: https://github.com/parcel-bundler/parcel/issues/4241
Thanks! I'll try
  • reply
  • like
though... I have no idea how to debug a plugin... tried to use '/logger' package to no avail :-(
  • reply
  • like
Can anybody let me know how to manually add a dependency to an asset so it ends up in the final bundle? Let's say I have a CSS asset and I want to add a header comment string to it programmatically. I assume I have to call createDependencyLocation somewhere, but not sure what to provide to moduleSpecifier (that ends up at filePath), since the dependency is solely virtual
  • reply
  • like
Also, this error:
Error: The plugin is not compatible with the current version of Parcel. Requires "2.x" but the current version is "2.0.0-nightly.130+48982e22".
while I have package.json like this:
"engines": {
"node": ">= 10.0.0",
"parcel": "2.x"
}
  • reply
  • like
this is the plugin I am building, it should just append a comment to the main css bundle with the classes used in the HTML bundle: https://gist.github.com/touzoku/044c9af71f53ffeec5c2b146c41fc8ae
It does successfully create an asset with classes, but it adds it as a dependency to index.html instead of main.css, and therefore does not invalidate main.css bundle hash :-( Not sure why.
Also, logger.info does not produce any logs output, nearly impossible to debug.
Edited
  • reply
  • like

March 11, 2020 at 6:09pm
Hi, is any way to use <svg class="icon"><use xlink:href="#rating-start"/></svg> using Parcel 2 ? ex. https://css-tricks.com/svg-symbol-good-choice-icons/
Edited
  • reply
  • like
Why isn't that working for you?
  • reply
  • like

March 12, 2020 at 2:03pm
Why isn't that working for you?
what i am doing wrong.. ? :)
  • reply
  • like
In your first message, you wrote href="#rating-start" (so without specifying an actual file). But you are actually using href="./icon.svg#rating-start". I guess <use href="./icon.svg"> is processed? Then we need to fix the hash handling. If that's the case, please open an issue on github
  • reply
  • like

March 13, 2020 at 4:37pm
ok i make some example with this problem and send here repo url
  • reply
  • like

March 18, 2020 at 8:31am
hi,i would be grlad if someone answer me, when i build my app i dont want to minify one of npm packages, is it possible?
  • reply
  • like
and i want to minify rest
  • reply
  • like
there is --no-minify flag but how should i use it for only single npm package?
  • reply
  • like
anyone can help?
  • reply
  • like