Questions tagged [snowpack]
107 questions
1
vote
2 answers
Snowpack cannot import JavaScript from node_modules
I'm currently using Snowpack to build/prepare an application. I'm trying to import a JavaScript library I installed as part of the dependencies (block) in the package.json file, but somehow Snowpack is not picking up the library.
This is (an excerpt…

x80486
- 6,627
- 5
- 52
- 111
1
vote
0 answers
snowpack build doesn't recognize tailwind classes in js file
I have a simple SPA build with snowpack and tailwindv and I have a main.js which is added in the html file as module. I uses ES6 import syntax in main.js to add Jquery and other js libs to use.
The problem -
Tailwindcss : I am using Tailwindcss…

B L Λ C K
- 600
- 1
- 8
- 24
1
vote
0 answers
"TypeError: _camelize.default is not a function" in React-Bootstrap
Using pre-built components from:
https://react-bootstrap.github.io/components/navs/
https://react-bootstrap.github.io/components/navbar/
I'm trying to build a navigation bar, but getting the following error:
Unhandled Runtime Error
TypeError:…

MB141
- 114
- 1
- 7
1
vote
0 answers
Failed to find a valid digest in the 'integrity' attribute after updating Snowpack
I'm new to Snowpack. After updating it some of my resources are blocked:
@snowpack/plugin-svelte ^3.5.2 → ^3.6.0
@snowpack/web-test-runner-plugin ^0.2.1 → ^0.2.2
snowpack ^3.0.13 → ^3.1.2
I'm…

Johnny Johnny
- 319
- 2
- 11
1
vote
1 answer
Using Snowpack to transpile Web Components and package dependencies
I am using Django to build a SSR website and using Django to serve static files. I also built some Web Components using lit-element and Typescript. I would like to avoid the complexity of Webpack and use Snowpack instead. Components are stored at…

nehalem
- 397
- 2
- 20
1
vote
0 answers
node fs not found with snowpack using typescript
I'm trying to create a snowpack project, which already fails by the basic start.
I set up a basic snowpack project, but when I try to start my dev server it will fail because of this line:
import * as fs from "fs/promises";
Showing me:
▼…

user2853437
- 750
- 8
- 27
1
vote
1 answer
How to use Routify with Snowpack and Svelte
I need to install Routify to Svelte app which is running with Snowpack.
Current documentation is very narrow and only shows an installation with Rollap.
I've tried a template to achieve it but I get errors on the Routify side.
How can I achieve…

Ulvi
- 965
- 12
- 31
1
vote
1 answer
Snowpack config only works for dev or build, but not both
I have a snowpack project with the following folder structure:
build : contains the built project
src : contains the source files
node_modules
package.json
snowpack.config.js
I set the following config:
// Snowpack Configuration…

Kokodoko
- 26,167
- 33
- 120
- 197
1
vote
2 answers
Calling i18n.js file on app's entry-point | svelte-i18n
I am trying to internationalize my Svelte app.
I am using Svelte with Snowpack. And svelte-i18n. I follow their tutorial on GitHub.
In the tutorial, they say :
"Note: Make sure to call your i18n.js file on your app's entry-point.
If you're using…

Ulvi
- 965
- 12
- 31
1
vote
2 answers
Does Snowpack support importing files using a glob pattern?
I am trying import all the files matching a glob pattern using Snowpack:
import allFiles from '../static/posts/**/*.md';
In Rollup you can achieve it with rollup-plugin-glob, is there anything like that in Snowpack ecosystem?

carlosvin
- 979
- 9
- 22
1
vote
1 answer
How do you work with dev, pre and prod with Snowpack?
I want to define environment variables in my package.json where I'm using Snowpack, but as far as I know Snowpack sets the NODE_ENV automatically based on dev vs build.
Is it possible to define variables for 3 modes instead of 2, I…

Johnny Johnny
- 319
- 2
- 11
1
vote
1 answer
Change default directory in Snowpack Vue app
I want to use Snowpack for my Vue 3 app. Currently, I've initialized the Vue 3 app using the following command:
npx create-snowpack-app my-app --template @snowpack/app-template-vue
By default, Snowpack creates a directory structure like…

Dev
- 921
- 4
- 14
- 31
1
vote
0 answers
Snowpack CopyPlugin cannot be invoked without 'new'
I am trying to get a Snowpack project setup where I need to use a Copy Plugin. I am trying to use copy-webpack-plugin but I am confused if we can use packages like this within the Snowpack config.
/** @type {import("snowpack").SnowpackUserConfig }…

Mike
- 401
- 6
- 12
1
vote
1 answer
Migrating from webpack/CRA to snowpack: Uncaught SyntaxError: The requested module X does not provide an export named Y
Please help me understand what is causing the error message below.
I'm trying to migrate a project to Snowpack, having used create-react-app previously. In this project I am using a library called react-konva for some canvas stuff. This library…

Ludwig Nagelhus
- 177
- 8
1
vote
1 answer
How to get snowpack to look inside a package for subpath
I am building a snowpack app right now, and I would like to import socket.io client in the frontend (For intellisense and offline dev testing). However, socket.io only exports the backend materials when using import ... from 'socket.io'.
Normally,…

Bagel03
- 725
- 7
- 22