Questions tagged [parceljs]

Blazing fast, zero configuration web application bundler

Official website

https://parceljs.org/

682 questions
0
votes
0 answers

Parcel keeps rewriting srcs and hrefs after parsing "parcel /index.html" but not after "parcel index.html" (while inside dir)

I just started learning Parcel, so apologies if this question makes no sense. Basically, when I'm inside a projectName/dist parcel index.html works just fine however when I'm in projectName dir and try parcel .\dist\index.html I get this…
berry
  • 1
0
votes
0 answers

Using Parcel with Handlebars

I would like to use Handlebars with Parcel, but without importing handlerbars partials, but having them in a script tag in html. Autocomplete!
SrdjaNo1
  • 755
  • 3
  • 8
  • 18
0
votes
0 answers

Failed to resolve 'flatpickr', @carbon/react and Parcel

I'm working on an app that uses react 18, with parcel. I'm trying to add carbon-design-datepicker from carbon design systems, but cannot get it to resolve. I've tried downgrading react version, delete node_modules and package-lock.json, re-install,…
0
votes
0 answers

How to stop Parcel removing `type="module"` attribute from `script` tags?

I'm trying to use Fast Web Components in a Pug template with Parcel, but the type="module" attribute is being stripped from the script tag and causing me to get the following error (from fast-components.min.js: Uncaught SyntaxError: export…
MattMS
  • 1,106
  • 1
  • 16
  • 32
0
votes
0 answers

ParcelJS dynamic routes

I want to dynamically route to one of 3 form types and I got it working on a separate branch but after merging it into master, it doesn't do it anymore. The URL gets set to the correct URL but it doesn't load the correct HTML/page.
Mout Pessemier
  • 1,665
  • 3
  • 19
  • 33
0
votes
0 answers

Build a React Embeddable widget

I'm trying to Build a React Embeddable widget and bundle it to use in different websites (HTML, React, Next....), I’m using parcel to bundle widgets component, and it's worked fine. I imported the bundler file like this: ...
0
votes
0 answers

Importing PostCSS file as module returns SyntaxError

I've been trying to import PostCSS file as module in my TypeScript, using Parcel. I've followed a YouTube video partially (not fully because they're running an older version of Parcel.), and also followed some parts of the Parcel documentation.…
Mxlvin
  • 288
  • 3
  • 10
0
votes
0 answers

How to avoid duplicate licenses with Parcel?

Is there a way to extract or duplicate the licenses when using Parcel (or Terser at it seems to be the underlying minifier)? The terser webpack plugin seems have a custom option extractComments…
Coding Edgar
  • 1,285
  • 1
  • 8
  • 22
0
votes
1 answer

Parcel Build Failed with error @parcel/resolver-default: Cannot load file '../../../../../css/main.css' in './src'

I use parcel@2.7.0. Everytime I load any external css or javascript file in my index.html, Parcel always fail to build with error : Build failed. @parcel/core: Failed to resolve './css/main.css' from './src/index.html'* @parcel/resolver-default:…
0
votes
0 answers

Minified Sass breaks Parcel.js serve - @parcel/transformer-css: Unexpected token AtKeyword("import")

I am using the following yarn script to compile my sass code: "scripts": { "start": "parcel src/pages/index.html", "watch-sass": "sass --watch src/sass/main.scss src/css/styles.css", "compile-sass": "sass src/sass/main.scss…
Raul
  • 2,673
  • 1
  • 15
  • 52
0
votes
0 answers

LESS miscompiling opacity property?

Although it works on a local development server, when deployed to production one of the properties in my CSS is abruptly being changed in value. The LESS says opacity: 92% but when I run npx parcel build on it, the resultant CSS file has opacity: 1%…
temporary_user_name
  • 35,956
  • 47
  • 141
  • 220
0
votes
0 answers

How to make Parcel build without JavaScript

We have a small static site based on Tailwind, PostCSS and PostHTML that doesn't contain any JS/TS code or