Questions tagged [snowpack]

107 questions
2
votes
1 answer

Snowpack multi-page application with svelte and tailwindcsss

I was able to partially setup the rollup + svelte + tailwind + multi-page , but its slow and debugging is difficult. though there is svelte + snowpack + tailwindcss is there here https://github.com/agneym/svelte-tailwind-snowpack but multi-page…
Abhijit Gujar
  • 433
  • 6
  • 15
2
votes
1 answer

Snowpack with Ant Design: Import "antd" could not be resolved

I want to use Ant Design with Snowpack. I followed the And Design docs and installed antd but whenever I run my application the dependency can't be resolved. I get the following error message: [snowpack] Import "antd" could not be resolved. If this…
2
votes
2 answers

antd design - Warning: React.createElement: type is invalid -- expected

I am getting this React error when running in dev mode with Snowpack Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. This import is where…
jonjonson
  • 263
  • 2
  • 5
  • 16
2
votes
1 answer

TypeError: Cannot read property '0' of undefined VueJS

I am seeing a strange issue with VueJS and HTML un/ordered list elements. All files build in my project without any errors but in browser you see nothing on the page and there is an error in browser Console. I have a fix (see below code), but am…
jlking
  • 73
  • 6
2
votes
1 answer

Snowpack - import scss into tsx

I am setting up a Snowpack project with the aim to move an existing Create-React-App application into it once things are configured the same. I haven't found a way to import an .scss file into a .tsx file however. The Snowpack docs only seem to…
elwyn
  • 10,360
  • 11
  • 42
  • 52
1
vote
0 answers

Snowpack says Im missing index.js when I'm not

Thanks for reading my question. I successfully made a React JS App from scratch on my other PC using snowpack. And I tried it on my other one. But when I set everything up in powershell(where Im running the npm start from), it keeps telling me…
1
vote
1 answer

Problems with 'fs' when I try to start snowpack

[15:03:25] [snowpack] Welcome to Snowpack! Because this is your first time running this project, Snowpack needs to prepare your dependencies. This is a one-time step and the results will be cached for the lifetime of your project. Please wait...…
1
vote
0 answers

Uncaught TypeError: Class extends value [object Object] is not a constructor or null" on SNOWPACK build JS of TDA-API-CLIENT

Uncaught TypeError: Class extends value [object Object] is not a constructor or null at tda-api-client.v2.1.3.js:3245:38 at createCommonjsModule (tda-api-client.v2.1.3.js:20:5) at tda-api-client.v2.1.3.js:3186:21 I will be going down…
PogChan
  • 11
  • 2
1
vote
1 answer

Images not loading in react while looping even after using require

I have created an array with title and images but when I am using the map to extract the image, the image path is getting printed as a string. I also tried using require keyword but the error is coming stating "require is not defined".I also tried…
user17043484
1
vote
1 answer

React typescript snowpack - can't import .webp

I just started using Snowpack for a React/Typescript project and initialized it with: https://www.npmjs.com/package/@snowpack/app-template-react-typescript. It looks very promising but I get an error [@snowpack/plugin-typescript] Cannot find module…
Jonathan
  • 517
  • 1
  • 6
  • 12
1
vote
1 answer

Snowpack cannot find imported module

I am working on a website using Preact, and I am trying to proxy requests made in the browser to the development server I'm using as the back end. When I try to run the front end application with yarn client, it errors out and informs me it cannot…
Catradora
  • 384
  • 1
  • 4
  • 12
1
vote
0 answers

Routify not build in production

I am trying to deploy a Svelte application that uses Snowpack as a build tool and Routify for handling routes on Netlify. When I run the build command locally, everything is ok, but on the Netlify instance, the .routify folder is not generated, so…
AlexPirciu
  • 85
  • 1
  • 8
1
vote
0 answers

How can I load a wasm file under node_modules as asset in snowpack?(for sql.js)

I want to use the sql.js library, which uses wasm to provide sql support in browser. To use this library in a React project, sql.js recommends using craco.js to extend the webpack config in CRA and use the file-loader package of webpack to fetch the…
Sri
  • 242
  • 3
  • 13
1
vote
0 answers

Import svg filter for webpack

I have a react project which used an svg filter for rendering: @use 'sass:math'; @import '../Theme.scss'; $borderW: 5px; $borderR: 5px; $numOfBlobs: 4; .blob-btn { z-index: 1; position: relative; padding: 20px 46px; margin-bottom: 30px; …
1
vote
0 answers

Snowpack with React and CSS modules bundled into JavaScript

I’m having an issue with Snowpack and CSS modules. When I build the app it creates a .json file with the hashed and non-hashed class names but they are not loaded into index.js and all the classes show as undefined when inspecting the page. When I…
beavykins
  • 5
  • 2