nuxt-monaco-editor 1.1.2 → 1.1.3-beta.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
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.1.3-beta.0](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.1.2...v1.1.3-beta.0) (2023-01-27)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * broken in nuxt 3.1.0 ([#20](https://github.com/e-chan1007/nuxt-monaco-editor/issues/20)) ([0c88b9e](https://github.com/e-chan1007/nuxt-monaco-editor/commit/0c88b9e4523dffc909cf1e2cb9198f2814afd680))
11
+
5
12
  ### [1.1.2](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.1.1...v1.1.2) (2023-01-16)
6
13
 
7
14
  ### [1.1.1](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.1.0...v1.1.1) (2022-12-09)
package/dist/module.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
- declare type MonacoEditorLocale = 'de' | 'es' | 'fr' | 'it' | 'ja' | 'ko' | 'ru' | 'zh-cn' | 'zh-tw' | 'en';
3
+ type MonacoEditorLocale = 'de' | 'es' | 'fr' | 'it' | 'ja' | 'ko' | 'ru' | 'zh-cn' | 'zh-tw' | 'en';
4
4
  interface ModuleOptions {
5
5
  dest?: string;
6
6
  locale?: MonacoEditorLocale;
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "1.1.2"
7
+ "version": "1.1.3-beta.0"
8
8
  }
package/dist/module.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { fileURLToPath } from 'url';
2
- import { defineNuxtModule, createResolver, extendViteConfig, checkNuxtCompatibility, addPlugin, addComponent, addImports } from '@nuxt/kit';
2
+ import { defineNuxtModule, createResolver, extendViteConfig, addPlugin, addComponent, addImports } from '@nuxt/kit';
3
3
  import { viteStaticCopy } from 'vite-plugin-static-copy';
4
4
 
5
5
 
@@ -31,18 +31,16 @@ const module = defineNuxtModule({
31
31
  const { resolve: resolveURL } = createResolver(nuxt.options.app.baseURL);
32
32
  const { resolve } = createResolver(runtimeDir);
33
33
  const monacoEditorLocation = resolveURL(options.dest);
34
- nuxt.options.app.head.link?.push({ rel: "preload", as: "script", href: `${monacoEditorLocation}/vs/editor/editor.main.js` });
35
34
  nuxt.options.app.head.script?.push({ src: `${monacoEditorLocation}/vs/loader.js` });
36
35
  nuxt.options.build.transpile.push(runtimeDir);
37
- nuxt.options.build.transpile.push("monaco-editor");
36
+ nuxt.options.build.transpile.push(({ isClient }) => isClient ? "monaco-editor" : false);
38
37
  nuxt.options.runtimeConfig.app.__MONACO_EDITOR_LOCALE__ = options.locale;
39
38
  nuxt.options.runtimeConfig.app.__MONACO_EDITOR_LOCATION__ = monacoEditorLocation;
40
- extendViteConfig(async (config) => {
41
- const shouldAppendURLPrefix = await checkNuxtCompatibility({ nuxt: "^3.0.0-rc.12" });
39
+ extendViteConfig((config) => {
42
40
  const viteStaticCopyPlugin = viteStaticCopy({
43
41
  targets: [{
44
42
  src: require.resolve("monaco-editor/min/vs/loader.js").replace(/\\/g, "/").replace(/\/vs\/loader\.js$/, "/*"),
45
- dest: nuxt.options.dev ? (shouldAppendURLPrefix ? "__url/" : "") + monacoEditorLocation.slice(1) : options.dest
43
+ dest: options.dest
46
44
  }]
47
45
  });
48
46
  if (!config.plugins) {
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.1.2",
14
+ "version": "1.1.3-beta.0",
15
15
  "type": "module",
16
16
  "license": "MIT",
17
17
  "exports": {
@@ -42,27 +42,28 @@
42
42
  "docs:preview": "nuxt preview docs"
43
43
  },
44
44
  "dependencies": {
45
- "@nuxt/kit": "^3.0.0",
45
+ "@nuxt/kit": "^3.1.1",
46
46
  "vite-plugin-static-copy": "^0.13.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@commitlint/cli": "^17.4.2",
50
50
  "@commitlint/config-conventional": "^17.4.2",
51
- "@nuxt-themes/docus": "^1.4.5",
51
+ "@nuxt-themes/docus": "^1.6.3",
52
52
  "@nuxt/module-builder": "latest",
53
- "@nuxt/test-utils-edge": "latest",
53
+ "@nuxt/test-utils": "^3.1.1",
54
54
  "@nuxtjs/eslint-config-typescript": "^12.0.0",
55
55
  "eslint": "^8.32.0",
56
+ "execa": "^6.1.0",
56
57
  "husky": "^8.0.3",
57
58
  "monaco-editor": "^0.34.1",
58
- "nuxt": "3.0.0",
59
+ "nuxt": "^3.1.1",
59
60
  "pinst": "^3.0.0",
60
- "playwright": "^1.29.2",
61
+ "playwright": "^1.30.0",
61
62
  "remark-cli": "^11.0.0",
62
63
  "remark-lint": "^9.1.1",
63
64
  "remark-preset-lint-recommended": "^6.1.2",
64
65
  "standard-version": "^9.5.0",
65
- "vitest": "^0.27.1"
66
+ "vitest": "^0.28.3"
66
67
  },
67
68
  "peerDependencies": {
68
69
  "monaco-editor": "*"