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

Missing "./dist/css/glide.core.min.css" specifier in "@glidejs/glide" package #701

Open
poldixd opened this issue Nov 21, 2024 · 1 comment

Comments

@poldixd
Copy link

poldixd commented Nov 21, 2024

After updating to 3.7.0 I became the following error, when I'm running npm run build:

❯ npm run build

> build
> vite build

vite v5.4.11 building for production...
✓ 25 modules transformed.
x Build failed in 809ms
error during build:
[vite-plugin-pwa:build] Missing "./dist/css/glide.core.min.css" specifier in "@glidejs/glide" package
    at e (file:///Users/poldi/Sites/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46041:25)
    at n (file:///Users/poldi/Sites/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46041:627)
    at o (file:///Users/poldi/Sites/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46041:1297)
    at resolveExportsOrImports (file:///Users/poldi/Sites/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46662:18)
    at resolveDeepImport (file:///Users/poldi/Sites/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46685:25)
    at tryNodeResolve (file:///Users/poldi/Sites/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46450:16)
    at Object.resolveId (file:///Users/poldi/Sites/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:46200:19)
    at file:///Users/poldi/Sites/website/node_modules/rollup/dist/es/shared/node-entry.js:20809:40
    at async PluginDriver.hookFirstAndGetPlugin (file:///Users/poldi/Sites/website/node_modules/rollup/dist/es/shared/node-entry.js:20709:28)
    at async resolveId (file:///Users/poldi/Sites/website/node_modules/rollup/dist/es/shared/node-entry.js:19313:26)

I'm importing the css files in my javascript file:

import Glide from '@glidejs/glide'
import '@glidejs/glide/dist/css/glide.core.min.css';

var glide = new Glide('.glide')
glide.mount()

With version 3.6.2 the build process works.

jedrzejchalubek pushed a commit that referenced this issue Nov 22, 2024
)

Fixes #700, #701 so that `import "@glidejs/glide/css/glide.core.css"` for example works again
@ltctech
Copy link

ltctech commented Dec 5, 2024

Also need to add:
"./src/*": "./src/*"

Otherwise webpack is unable to find scss files and build fails:

Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Can't find stylesheet to import.
   ╷
34 │ @import '@glidejs/glide/src/assets/sass/glide.core';
   │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵

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

2 participants