Skip to content

Commit 37ad7e9

Browse files
committed
DOC-3329: Add known issue for import failure for inlinecss for tinymce-premium.
1 parent d9a88a1 commit 37ad7e9

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

modules/ROOT/pages/8.3.0-release-notes.adoc

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,32 @@ The following premium plugin updates were released alongside {productname} {rele
133133

134134
This section describes issues that users of {productname} {release-version} may encounter and possible workarounds for these issues.
135135

136-
There <is one | are <number> known issue<s> in {productname} {release-version}.
136+
There is one known issue in {productname} {release-version}.
137137

138-
=== <TINY-vwxyz 1 changelog entry>
139-
// #TINY-vwxyz1
138+
=== Vite/Rollup import issue with `tinymce-premium/plugins/inlinecss`
140139

141-
// CCFR here.
140+
When using Vite or Rollup as a bundler, importing the `inlinecss` plugin from the `tinymce-premium` package using `import 'tinymce-premium/plugins/inlinecss'` may fail due to a pattern matching bug in Vite/Rollup. The bundler incorrectly matches the `./plugins/*.css` pattern instead of `./plugins/*`, causing the import to fail.
141+
142+
**Workaround:** Use an alias in your `vite.config.js` file to explicitly resolve the plugin path:
143+
144+
[source,javascript]
145+
----
146+
import { defineConfig } from 'vite'
147+
import path from 'node:path'
148+
149+
export default defineConfig({
150+
resolve: {
151+
alias: {
152+
'tinymce-premium/plugins/inlinecss':
153+
path.resolve(__dirname, 'node_modules/tinymce-premium/plugins/inlinecss/index.js'),
154+
},
155+
},
156+
})
157+
----
158+
159+
Alternatively, you can use the explicit import paths that work correctly:
160+
- `import 'tinymce-premium/plugins/inlinecss/index.js'`
161+
- `import 'tinymce-premium/plugins/inlinecss/plugin.js'`
162+
163+
**Status:** This is a known issue with Vite/Rollup's pattern matching. Webpack handles this correctly without any workaround.
142164

0 commit comments

Comments
 (0)