方诺官网改正版

vue.config.js 1.1 KiB

vor 4 Jahren
vor 4 Jahren
vor 4 Jahren
vor 4 Jahren
123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const webpack = require("webpack");
  2. const path = require("path");
  3. const CKEditorWebpackPlugin = require("@ckeditor/ckeditor5-dev-webpack-plugin");
  4. const {styles} = require("@ckeditor/ckeditor5-dev-utils");
  5. module.exports = {
  6. configureWebpack: {
  7. plugins: [
  8. new webpack.ProvidePlugin({
  9. cash: "cash-dom"
  10. }),
  11. new CKEditorWebpackPlugin({
  12. language: "en",
  13. translationsOutputFile: /app/
  14. })
  15. ],
  16. },
  17. transpileDependencies: [/ckeditor5-[^/\\]+[/\\]src[/\\].+\.js$/],
  18. chainWebpack: config => {
  19. const svgRule = config.module.rule("svg");
  20. svgRule.exclude.add(path.join(__dirname, "node_modules", "@ckeditor"));
  21. config.module
  22. .rule("cke-svg")
  23. .test(/ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/)
  24. .use("raw-loader")
  25. .loader("raw-loader");
  26. config.module
  27. .rule("cke-css")
  28. .test(/ckeditor5-[^/\\]+[/\\].+\.css$/)
  29. .use("postcss-loader")
  30. .loader("postcss-loader")
  31. .tap(() => {
  32. return styles.getPostCssConfig({
  33. themeImporter: {
  34. themePath: require.resolve("@ckeditor/ckeditor5-theme-lark")
  35. },
  36. minify: true
  37. });
  38. });
  39. }
  40. };