Questions tagged [parceljs]

Blazing fast, zero configuration web application bundler

Official website

https://parceljs.org/

682 questions
0
votes
1 answer

How to import with concatenation using Parcel?

I have a directory full of JSON files. I am trying to write a function to load one of them by name at runtime. When I am using Webpack, I can just do something like this: const data = await…
laptou
  • 6,389
  • 2
  • 28
  • 59
0
votes
1 answer

Parceljs ignore the rules of tsconfig.json on build

I'm currently working on a React project using typescript and the bundler ParcelJs. I'm using a tsconfig.json file to configure typescript but for some reason that I don't know, Parcejs doesn't consider it ignoring all the errors on build. For…
johannchopin
  • 13,720
  • 10
  • 55
  • 101
0
votes
2 answers

Importing external stylesheets globally with CSS modules

I'm struggling to add SASS with an external stylesheet (Bulma) to my React application. So far I have set up Parcel with CSS modules via postcss. This is my .postcssrc config: { "modules": true, "plugins": { "autoprefixer": { "grid":…
Czyzby
  • 2,999
  • 1
  • 22
  • 40
0
votes
0 answers

Code compiled by Parceljs is not working in IE

I have written the code in es6 format and compiled the code using parceljs. It is working fine in Chrome and not working in IE11. I am getting an error: Object doesn't support property or method 'forEach' Code written: function startGame(){ …
0
votes
1 answer

@testing-library/react import error with Parcel 2 + Jest + TypeScript stack

https://codesandbox.io/s/jovial-cohen-hgb98 When I run this same setup locally, I get a TS error message on the @testing-library/react import: TypeError: Cannot read property 'default' of undefined I thought this might be something to do with the…
jjenzz
  • 1,519
  • 1
  • 14
  • 19
0
votes
1 answer

Include git information on parceljs build

I have a TypeScript/React web app that uses ParcelJS and I would like to have either a step in the build or a simple way of using a resource file that holds git information. Not sure if there is something that can generate the git information during…
Sergio
  • 590
  • 1
  • 9
  • 16
0
votes
1 answer

Single SCSS rule showing 'undefined' on server but works in localhost

I have an app built using React with Parcel. I am attempting code splitting via modules, but have a strange issue. On my home page, I am importing a module that has its own css. When the component is showing on the page, there is one single css…
EricBellDesigns
  • 955
  • 1
  • 9
  • 33
0
votes
0 answers

DOM element reference lost after dynamic import

I try to use a dynamic import in the client for a big module. The module returns an object with zips as the keys for the corresponding city names. Now the problem is, that after the import the reference to the DOM element (e.target) is lost: if(…
Getter Jetter
  • 2,033
  • 1
  • 16
  • 37
0
votes
1 answer

Build CSS file refused by Heroku app deployment

I have deployed a React + NodeJS app in Heroku and the deployment went well and worked for a few hours. However, after a cache deletion, it now refuses to load the page. The errors are the following ones: Refused to apply style from…
cgobbet
  • 309
  • 4
  • 12
0
votes
1 answer

Is there a javascript bundler that supports custom runtime loading?

I am using custom compression for my assets and would like to use some modern web bundler (webpack, rollup, parcel, etc.) I am implementing both server side and client side, but I couldn't find how to implement runtime transformation when fetching…
0
votes
1 answer

Parcel alias not registering with tslint

I'm using parcel-bundler for react with TypeScript, and I've set up some aliases in package.json. This is my tsconfig.json { "compilerOptions": { "allowJs": true, "jsx": "react", "baseUrl": ".", "paths": { "~*": ["./src/*"] …
user966137
  • 29
  • 1
  • 4
0
votes
1 answer

Importing CSS from node_modules into JS modules results in "undefined" class name in generated html

I'm using Parcel and I could successfully import CSS/SCSS files into my React modules: import * as styles from './my-component.css'; ....
A text
// Which will be generated as
A…
Hans
  • 2,674
  • 4
  • 25
  • 48
0
votes
2 answers

How to a change my starting url to a custom url using parceljs

{ "name": "openlayers", "version": "1.0.0", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "parcel index.html", "build": "parcel build --public-url . index.html" }, …
user12053089
0
votes
0 answers

Different ParcelJs bundles for web and mobil users

I have an old Durandal site that are using requireJS for module loading. We are building 3 different main.js bundles. Web, Mobile and one for the site embedded in a WPF desktop app. The same goes for the css/scss. My motivation for moving the build…
Martin Andersen
  • 2,460
  • 2
  • 38
  • 66
0
votes
0 answers

svg url doesnt compiled using parceljs

I'm using parceljs to bundle my code. I'm trying to add an ajax loader while rendering data from the server. but the SVG icons doenst appear. by inspecting the page I saw that the loader element exist but the SVG height and width are 0. I know that…