Skip to content

Commit

Permalink
update ckeditor dev packages to 45.0.8 and align webpack.config
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-meisner committed Dec 5, 2024
1 parent 704ffae commit 1cecb7c
Show file tree
Hide file tree
Showing 3 changed files with 648 additions and 1,123 deletions.
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-runtime": "^7.25.4",
"@ckeditor/ckeditor5-dev-translations": "^43.0.1",
"@ckeditor/ckeditor5-dev-utils": "^43.0.1",
"@ckeditor/ckeditor5-dev-translations": "^45.0.8",
"@ckeditor/ckeditor5-dev-utils": "^45.0.8",
"@ckeditor/ckeditor5-inspector": "^4.1.0",
"@ckeditor/ckeditor5-theme-lark": "43.3.1",
"@types/node": "^20.14.10",
Expand Down
24 changes: 14 additions & 10 deletions app/webpack.config.cjs → app/webpack.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,28 @@

/* eslint-env node */

const path = require("path");
const webpack = require("webpack");
const { bundler, loaders } = require("@ckeditor/ckeditor5-dev-utils");
const { CKEditorTranslationsPlugin } = require("@ckeditor/ckeditor5-dev-translations");
const TerserPlugin = require("terser-webpack-plugin");
const CircularDependencyPlugin = require("circular-dependency-plugin");
const { default: path } = await import("path");
const { default: webpack } = await import("webpack");
const { bundler, loaders } = await import("@ckeditor/ckeditor5-dev-utils");
const { CKEditorTranslationsPlugin } = await import("@ckeditor/ckeditor5-dev-translations");
const { default: TerserPlugin } = await import("terser-webpack-plugin");
const { default: CircularDependencyPlugin } = await import("circular-dependency-plugin");
import { fileURLToPath } from "url";

module.exports = {
const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);

export default {
devtool: "source-map",
performance: { hints: false },

entry: path.resolve(__dirname, "src", "index.ts"),
entry: path.resolve(dirname, "src", "index.ts"),

output: {
// The name under which the editor will be exported.
library: "ClassicEditor",

path: path.resolve(__dirname, "dist"),
path: path.resolve(dirname, "dist"),
filename: "ckeditor.js",
libraryTarget: "umd",
libraryExport: "default",
Expand Down Expand Up @@ -57,7 +61,7 @@ module.exports = {
rules: [
loaders.getIconsLoader({ matchExtensionOnly: true }),
loaders.getStylesLoader({
themePath: require.resolve("@ckeditor/ckeditor5-theme-lark"),
themePath: import.meta.resolve("@ckeditor/ckeditor5-theme-lark"),
minify: true,
}),
loaders.getTypeScriptLoader(),
Expand Down
Loading

0 comments on commit 1cecb7c

Please sign in to comment.