- Issue created by @wotnak
- πΊπΈUnited States mortona2k Seattle
Elevating the priority because this is going to be a problem for people who want to update when 10.3 comes out. Critical may be appropriate for this.
I tried updating the code to change the paths for the new component library names, but it didn't work to change the final library definition.
Drupal\Core\Asset\LibraryDiscoveryParser->librariesForComponents() is where it builds components.all.
I'm looking into available hooks for overriding that - any other ideas?
- Status changed to Needs review
11 days ago 10:06pm 16 June 2024 - πΊπΈUnited States mortona2k Seattle
Figured it out. Just got this working, so needs some testing.
- π¦πΉAustria mvonfrie
The documentation regarding the Vite configuration example needs to be updated as well.
* in `<theme>/vite.config.ts`: ```diff import { defineConfig } from "vite" import multiInput from "rollup-plugin-multi-input" export default defineConfig({ plugins: [multiInput.default()], build: { manifest: true, rollupOptions: { input: [ [...] + "components/**/*.pcss.css", + "components/**/*.ts", ], }, }, [...] }) ```
The
import multiInput from "rollup-plugin-multi-input"
and then loading the plugin withmultiInput.default()
no longer works for me> I'm getting the following error:You must supply options.input to rollup
If I change this to
multiInput()
as in the examples from the rollup-plugin-multi-input repo itself, I get another error:failed to load config from /var/www/html/vite.config.js
error during build:
TypeError: multiInput is not a functionI don't have a solution for this yet.
Version info:
Node 18.20 or 20.14.8
Yarn: 4.3.0
Vite: 5.3.1
Typescript: 5.2.2
rollup-plugin-multi-input: 1.4.1 - πΊπΈUnited States mortona2k Seattle
Here's what I got:
build: { outDir: "dist", emptyOutDir: true, manifest: true, rollupOptions: { watch: true, input: [ ...globSync('libraries/*/*.{css,js}'), # <-- single asterisk to only include top level files in directories. ...globSync('components/**/*.{css,js}'), ...globSync('layouts/**/*.{css,js}'), ], output: { entryFileNames: `[name].js`, assetFileNames: `[name].[ext]`, }, }, },