qwikifiers/qwik-nx

Building and viewing storybook causes @qwik-city-sw-register error

Closed this issue · 2 comments

Current Behavior

Build storybook and serve it, you'll get an error that:

Failed to resolve module specifier "@qwik-city-sw-register". Relative references must start with either "/", "./", or "../".

Expected Behavior

Storybook should be browseable even after it has been built. Imagine if you want to deploy all of your components to be browseable for documentation purposes

GitHub Repo

No response

Steps to Reproduce

  1. Create a new project
npx create-nx-workspace@17.0 --preset=qwik-nx --qwikAppName=myapp
npx nx g qwik-nx:storybook-configuration myapp
npx nx g qwik-nx:component --name=my-component -p myapp --generateStories
  1. Build and serve your newly built storybook
npx nx run myapp:build-storybook
npx http-server dist/storybook/myapp
  1. You'll see an error:
Screenshot 2023-11-28 at 00 01 23

Nx Report

Node   : 18.18.2
   OS     : darwin-arm64
   npm    : 8.19.4
   
   nx                 : 17.1.3
   @nx/js             : 17.1.3
   @nx/linter         : 17.1.3
   @nx/eslint         : 17.1.3
   @nx/workspace      : 17.1.3
   @nx/cypress        : 17.1.3
   @nx/devkit         : 17.1.3
   @nx/eslint-plugin  : 17.1.3
   @nx/storybook      : 17.1.3
   @nrwl/tao          : 17.1.3
   @nx/vite           : 17.1.3
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   qwik-nx : 2.0.2

Failure Logs

No response

Additional Information

No response

related to #206?