partial$module-loading/bundling-ref-example.adoc :!editorcomponent:
The following table shows examples of the syntax used to bundle the following content CSS file:
./skins/content/example/content.css
Example syntax for including the example content CSS in a bundle:
| Module Syntax | Source | Example |
|---|---|---|
ES6+ (Webpack/Rollup) |
npm |
import contentCSS from 'tinymce/skins/content/example/content.css'; |
|
import contentCSS from '../tinymce/skins/content/example/content.css'; |
|
ES6+ (Vite) |
npm |
import 'tinymce/skins/content/example/content.js'; |
|
import '../tinymce/skins/content/example/content.js'; |
|
Common JS |
npm |
const contentCSS = require('tinymce/skins/content/example/content.css'); |
|
const contentCSS = require('../tinymce/skins/content/example/content.css'); |
|
Important
|
The handling of content CSS files varies between bundling tools:
View the relevant guide for the required syntax at Bundling {productname} with a module loader. |