andrelmlins / svelte-fullscreen

Component that performs fullscreen in DOM Elements
https://svelte-fullscreen.netlify.com/
MIT License
66 stars 1 forks source link

Error: screenfull does not provide an export named 'default' #4

Open brian-hay opened 3 years ago

brian-hay commented 3 years ago

When attempting to use this I get the error:

screenfull does not provide an export named 'default'

andrelmlins commented 3 years ago

Hi Bryan, could you bring more details of your project setup?

brian-hay commented 3 years ago

It's a pretty basic Svelte, Vite/Rollup, TypeScript setup.

Relevant details from package.json:

{
  "name": "my-project",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "serve": "vite preview"
  },
  "devDependencies": {
    "@sveltejs/vite-plugin-svelte": "^1.0.0-next.17",
    "autoprefixer": "^10.3.4",
    "resize-observer-polyfill": "^1.5.1",
    "svelte": "^3.42.1",
    "svelte-preprocess": "^4.7.4",
    "typescript": "^4.3.5",
    "vite": "^2.5.0"
  },
  "dependencies": {
    "normalize.css": "^8.0.1",
    "svelte-fullscreen": "^2.0.0",
  }
}
andrelmlins commented 3 years ago

I tested it with the default vite configuration and it worked

npm init vite@latest my-svelte-app --template svelte

Can you create a repository with your configuration?

brian-hay commented 3 years ago

I'll see if I can replicate it in a smaller repo.

I do have more info though - it seems production (default Rollup) builds work just fine, but it's only the Vite dev HMR environment where I see the reported error in the console: image

andrelmlins commented 3 years ago

It's an error in the internal dependency, I'm trying to simulate, any news, notice here