Questions tagged [snowpack]

107 questions
25
votes
1 answer

Snowpack with Angular?

I've been going through the snowpack introduction and got really excited about the tool. Unfortunately, at the end of documentation I could not find Angular among the supported libraries. However, Snowpack seemed to be quite flexible so I wonder if…
Dávid Konkoly
  • 1,853
  • 1
  • 13
  • 8
9
votes
2 answers

Snowpack dev server is not recompiling files in node_modules when changed

I have a snowpack project that I started from the blank template. My index.js file calls a function from another module I'm developing that I have installed using npm link. When I change a file in the other module, it doesn't get updated in…
Ben Davis
  • 13,112
  • 10
  • 50
  • 65
8
votes
0 answers

Using react-admin with snowpack

I want to use react-admin in a project with snowpack but I encounter the following error ✖ snowpack failed to load node_modules/ra-core/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js 'default' is not exported by…
thammada.ts
  • 5,065
  • 2
  • 22
  • 33
7
votes
2 answers

snowpack: reference files outside of project folder

Our team develops a bunch of JavaScript browser apps. These apps share functionality (core) and Web Components (shared). The folder structure is: /apps /app-1 /app-2 ... /core /shared Each folder contains a src folder. Considering…
Filchos
  • 71
  • 3
7
votes
2 answers

JavaScript private class methods with Snowpack

I use private JavaScript class methods in my front-end code and Snowpack for my development workflow. Currently (as of v2.15.0-pre.5), Snowpack doesn't seem to play well with private class methods, i.e., the following fails to when building with…
noseratio
  • 59,932
  • 34
  • 208
  • 486
7
votes
3 answers

Run a script (like postinstall) after npm installing a single package?

I'm starting to play around with Snowpack. It takes a different approach from Webpack by bundling individual packages right after they're installed. The "issue" is, when I install a package I have to first run npm install --save my-package and then…
Brady Dowling
  • 4,920
  • 3
  • 32
  • 62
6
votes
1 answer

The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system' error from snowpack+testing-library

I am having trouble setting up the Jest and React Testing Library for the snowpack project and wondering if any of you have encountered something similar. So the error I am getting is The 'import.meta' meta-property is only allowed when the…
6
votes
1 answer

Svelte with snowpack gives "Not Implemented: Animation" when trying to import transitions

Usually, I can import a flip or other animations in svelte like this: import { flip } from "svelte/animate"; However, I'm unsure why I'm getting the following error in snowpack with svelte: Build Error: @snowpack/plugin-svelte Error: Not…
Duane J
  • 1,615
  • 1
  • 15
  • 22
6
votes
2 answers

Natively import ES module dependencies from npm without bundling/transpiling first-party source

Background I'm trying to create a "buildless" JavaScript app, one where I don't need a watch task running to transpile JSX, re-bundle code, etc every time I save any source file. It works fine with just first-party code, but I'm stuck when I try to…
5
votes
1 answer

Multiple entry points with Snowpack

I'm looking to switch from Webpack to Snowpack for a development environment. But I have multiple entry points set up in Webpack and I haven't been able to find an example of how to do this in Snowpack. It seems that Snowpack is meant to be used…
DavGarcia
  • 18,540
  • 14
  • 58
  • 96
5
votes
0 answers

How to get Alias Working in a Snowpack Svelte App

I'm trying to compile Svelte Components in another folder and Snowpack can not find the path even with the alias in the snowpack.config.json file. Any help on getting this working is appreciated!!! Here is the snowpack.config.json file. { "alias":…
SteveO
  • 691
  • 2
  • 8
  • 19
4
votes
0 answers

Semicolon or block expected error svelte with postcss

I have set up a project with snowpack for svelte in which I'm trying to use tailwind for styling, but using states like hover or focus results in vs code throwing the error Semicolon or block is expected If you expect this syntax to work, here are…
AlexPirciu
  • 85
  • 1
  • 8
4
votes
0 answers

How to setup a Typescript mono-repo with multilevel dependency graph without going through build cycles?

I have a typescript mono-repo containing 3 packages as follows: Package A: a React Single-Page-Application which uses packages B and C. Package B: a UI library which uses Package C. Package C: a utility package with 3rd party dependencies. My goal…
Guy
  • 12,488
  • 16
  • 79
  • 119
4
votes
1 answer

Snowpack with local npm packages

We have problem to run snowpack with our package structure. Our structure: adapters app core presentation Each package contains typescript and all are used in the app package. "dependencies": { "@project/adapters": "file:../../adapters", …
Ben Keil
  • 1,050
  • 1
  • 10
  • 30
4
votes
1 answer

Forcing Snowpack to build into one file

Snowpack dev is very cool - but for my needs I will need all js/css/images packed into exactly one bundle.js file. No chunks or anything else. I have tried using the following webpack plugin config in snowpack.config.js's plugins: [ …
Udi
  • 29,222
  • 9
  • 96
  • 129
1
2 3 4 5 6 7 8