@markweave/vue2 0.7.10 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,7 +25,23 @@ export default {
25
25
  </script>
26
26
  ```
27
27
 
28
- Vue remains a peer dependency and should come from the host app. Vue CLI 4 / Webpack 4 projects should keep `vue-template-compiler` on the same Vue 2.6.x version as `vue`.
28
+ Vue remains a peer dependency and should come from the host app. Vue CLI 4 / Webpack 4 projects should keep `vue-template-compiler` on the same Vue 2.6.x version as `vue`.
29
+
30
+ ## Vue CLI 4 / Webpack 4 Legacy Entry
31
+
32
+ The dedicated ES2019 entry prebundles heavy editor features while preserving Vue, the Tiptap Vue 2 adapter, Tiptap core/PM, and ProseMirror as host-owned singleton runtimes. Keep normal component imports and apply the published helper in `vue.config.js`:
33
+
34
+ ```js
35
+ const applyMarkweaveVue2Webpack4Legacy = require("@markweave/vue2/webpack4");
36
+
37
+ module.exports = {
38
+ chainWebpack(config) {
39
+ applyMarkweaveVue2Webpack4Legacy(config, { projectRoot: __dirname });
40
+ },
41
+ };
42
+ ```
43
+
44
+ Hosts that own their aliases can import `@markweave/vue2/legacy` explicitly and pass `aliasPackageImport: false`. Do not add Markweave, Mermaid, Cytoscape, D3, or Lowlight to a broad Babel rule when using this entry. The helper keeps its cache outside `node_modules` so repeated `npm ci` builds can reuse it.
29
45
 
30
46
  The built-in outline uses `inner-toc-placement="container"` by default, keeping it vertically centered in the visual viewport while symmetric TOC gutters keep the writing column centered. It hides automatically in a narrow editor container to preserve readable content width.
31
47