Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't resolve 'svelte-loader' when using styles in Svelte 5 beta #248

Open
dshook opened this issue Jan 30, 2025 · 0 comments
Open

Can't resolve 'svelte-loader' when using styles in Svelte 5 beta #248

dshook opened this issue Jan 30, 2025 · 0 comments

Comments

@dshook
Copy link

dshook commented Jan 30, 2025

Hi again, found another issue with the Svelte support. When you include a <style> tag in a Svelte component you then get this build error:

ERROR in ./content/Results.svelte 36:0-37:1
Module not found: Error: Can't resolve 'svelte-loader' in '/Users/dillonshook/extension-svelte-test/content'
resolve 'svelte-loader' in '/Users/dillonshook/extension-svelte-test/content'
  Parsed request is a module
  using description file: /Users/dillonshook/extension-svelte-test/package.json (relative path: ./content)
    resolve as module
      /Users/dillonshook/extension-svelte-test/content/node_modules doesn't exist or is not a directory
      looking for modules in /Users/dillonshook/extension-svelte-test/node_modules
        single file module
          using description file: /Users/dillonshook/extension-svelte-test/package.json (relative path: ./node_modules/svelte-loader)
            no extension
              /Users/dillonshook/extension-svelte-test/node_modules/svelte-loader doesn't exist
            .js
              /Users/dillonshook/extension-svelte-test/node_modules/svelte-loader.js doesn't exist
        /Users/dillonshook/extension-svelte-test/node_modules/svelte-loader doesn't exist
      /Users/dillonshook/node_modules doesn't exist or is not a directory
      /Users/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
 @ ./content/google_entrypoint.ts 1:26-64 1:256-263

webpack 5.97.1 compiled with 1 error in 1435 ms
 ELIFECYCLE  Command failed with exit code 1.

Updated the example repo with an example: https://github.com/dshook/extension-svelte-test using [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant