Questions tagged [parceljs]

Blazing fast, zero configuration web application bundler

Official website

https://parceljs.org/

682 questions
0
votes
1 answer

Unable to install NPM inside Docker

I have a project that builds locally, and I try to create a Docker image. In my project, I install NPM packages, and my package file is located at: \src\Core.Blazor\package.json But, when I try to build my Docker image, it failed with the following…
ClubberLang
  • 1,624
  • 3
  • 21
  • 45
0
votes
1 answer

Exporting a function from an already exported function

I am doing a project using Nodejs for the backend, vanilla JS compiled with Parcel Bundler for the client side JS and PUG template engine to generate the views. Note that I also use the FullCalendar v5 plugin. I don't think this is relevant as I…
Tom687
  • 182
  • 2
  • 14
0
votes
4 answers

Snowpack & Peerjs: Uncaught ReferenceError: assignment to undeclared variable parcelRequire

I tried to make a small app using peerjs but when I tried to import Peer from "peerjs", my code crash with: Uncaught ReferenceError: assignment to undeclared variable parcelRequire At http://localhost:8080/_snowpack/pkg/peerjs.js:20 I didn't find…
LitleCodeur
  • 21
  • 1
  • 8
0
votes
0 answers

Parcel breaks XMLHttpRequest

var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo").innerHTML = xhttp.responseText; } }; xhttp.open("GET",…
marcphero
  • 1
  • 1
0
votes
1 answer

heroku unable to host nodejs error shows unable to recognise parcel

Error log of Heroku platform enter image description here I tried to deploy app on Heroku sever but was unable to do due to some error I tried to make Proc file and also edit the start point still it is unable to recognize parcel and also showing it…
0
votes
1 answer

Parceljs webp converter

Is there any chance to convert images (jpg, png, ...) to webp format in Parceljs ? I can't find any Parceljs plugin for this action.
Arsen
  • 119
  • 2
  • 7
0
votes
2 answers

Dynamically creating an element on which the react app mounts

I want to create a build of my javascript application using react which currently is just a single file defined as below. It does nothing but creates a div and keeps on changing the color of the hello-world text after it mounts. import * as React…
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
0
votes
3 answers

How does import with tilde (~) work in parcel-2?

In parcel 1, I was able to import with tilde (~) which usually refers to the nearest directory or the root directory of the project. But, I recently upgraded to parcel 2 and it's complaining. How do I enable the ~ path resolvers in a…
0
votes
0 answers

Webpack: prebuild lifecycle hook for libraries

I'm the author of a library and I need a script to be run each time before webpack bundles my library into the user's app code. My library's package.json would be something like this: { "name": "some-js-library", "version": "0.1.0", "scripts":…
brillout
  • 7,804
  • 11
  • 72
  • 84
0
votes
0 answers

Bundling Openlayers Master Package as a Browser Bundle

I wanted to upgrade to the latest to use some nice new features. I am using ExtJS so I have to use a bundle with ol global variable. I followed this step to create it but it uses Parcel. I also tried Rollup, Webpack, and Browserify with no success.…
wondim
  • 697
  • 15
  • 29
0
votes
1 answer

Parcel.js - Can I mangle \ obfuscate import names in the build bundle?

I'm building a chrome extension with Parcel. According to chrome webstore policy (that hosts Chrome extensions) - Chrome extensions are prohibited to use obfuscation. Unfortunately, for now, we cannot move mission-critical code to a server; and have…
avalanche1
  • 3,154
  • 1
  • 31
  • 38
0
votes
1 answer

How do I use a local plugin with ParcelJS

I use ParcelJS to bundle my JavaScript code. I want to modify an existing plugin (say the Elm plugin) to convert some special files on the fly with our own proprietary transpiler to JavaScript. Therefor I cannot install the plugin from teh npmjs…
halloleo
  • 9,216
  • 13
  • 64
  • 122
0
votes
1 answer

Parcel Bundler: Everything is okay on localhost but The index.html on Dist is showing Error

I am learning Parcel and trying to bundle a index.html connected with index.js. Everything is okay on the parcel localhost:1234 but in the dist folder when I open the index.html the app is not working. Note: I know that the problem is caused from…
Sami Shafi
  • 29
  • 1
  • 7
0
votes
1 answer

How to use injectManifest in Workbox with Parcel-bundler?

I am building a service worker for my PWA with Workbox. service-worker.js import { registerRoute } from 'workbox-routing'; import { NetworkFirst } from 'workbox-strategies'; import { CacheFirst, StaleWhileRevalidate } from…
Chirag Bhansali
  • 1,900
  • 1
  • 15
  • 22
0
votes
1 answer

Parcel PostCSS preprocessing /dynamic imports not working

I'm trying to convert from Sass to PostCSS with PreCSS plugin on Parcel, but Parcel keeps importing an unchanged CSS file. There is a correctly processed file in the dist folder, but Parcel imports another file in the Dist folder that was never…
AsyncBanana
  • 37
  • 2
  • 9