nuxt-monaco-editor 1.4.0-alpha.1 → 1.4.0-alpha.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.4.0-alpha.2](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.4.0-alpha.1...v1.4.0-alpha.2) (2025-08-13)
6
+
5
7
  ## [1.4.0-alpha.1](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.4.0-alpha.0...v1.4.0-alpha.1) (2025-08-13)
6
8
 
7
9
 
package/dist/module.d.mts CHANGED
@@ -3,6 +3,7 @@ import * as _nuxt_schema from '@nuxt/schema';
3
3
  type MonacoEditorLocale = 'cs' | 'de' | 'es' | 'fr' | 'it' | 'ja' | 'ko' | 'pl' | 'pt-br' | 'qps-ploc' | 'ru' | 'tr' | 'zh-hans' | 'zh-hant' | 'en';
4
4
  interface ModuleOptions {
5
5
  locale?: MonacoEditorLocale;
6
+ optimizeMonacoDeps?: boolean;
6
7
  removeSourceMaps?: boolean;
7
8
  componentName?: {
8
9
  codeEditor?: string;
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.1.0 || ^4"
6
6
  },
7
- "version": "1.4.0-alpha.1",
7
+ "version": "1.4.0-alpha.2",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.0"
package/dist/module.mjs CHANGED
@@ -1,8 +1,9 @@
1
1
  import { fileURLToPath } from 'node:url';
2
- import { createResolver, defineNuxtModule, addVitePlugin, addComponent, addImports } from '@nuxt/kit';
2
+ import { createResolver, defineNuxtModule, extendViteConfig, addVitePlugin, addComponent, addImports } from '@nuxt/kit';
3
3
  import { viteStaticCopy } from 'vite-plugin-static-copy';
4
4
  import fs from 'fs/promises';
5
5
  import { createRequire } from 'node:module';
6
+ import defu from 'defu';
6
7
 
7
8
  const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url));
8
9
  const { resolve } = createResolver(runtimeDir);
@@ -62,6 +63,7 @@ const plugin = (options, nuxtOptions) => ({
62
63
  const getDefaults = (nuxt) => {
63
64
  return {
64
65
  locale: "en",
66
+ optimizeMonacoDeps: true,
65
67
  removeSourceMaps: !nuxt.options.dev,
66
68
  componentName: {
67
69
  codeEditor: "MonacoEditor",
@@ -82,6 +84,16 @@ const module = defineNuxtModule({
82
84
  const { resolve } = createResolver(runtimeDir);
83
85
  nuxt.options.build.transpile.push(runtimeDir);
84
86
  nuxt.options.build.transpile.push(({ isClient }) => isClient ? "monaco-editor" : false);
87
+ extendViteConfig((config) => {
88
+ config.optimizeDeps = defu(
89
+ options.optimizeMonacoDeps ? {
90
+ include: ["monaco-editor"]
91
+ } : {
92
+ exclude: ["monaco-editor"]
93
+ },
94
+ config.optimizeDeps
95
+ );
96
+ });
85
97
  addVitePlugin(plugin(options, nuxt.options));
86
98
  addVitePlugin(viteStaticCopy({
87
99
  targets: [{
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/e-chan1007/nuxt-monaco-editor.git"
13
13
  },
14
- "version": "1.4.0-alpha.1",
14
+ "version": "1.4.0-alpha.2",
15
15
  "type": "module",
16
16
  "license": "MIT",
17
17
  "exports": {