fix: removed @ts-expect-error
This commit is contained in:
@@ -1,17 +1,17 @@
|
|||||||
import React from "react"
|
|
||||||
import ContentstackSDK from "@contentstack/app-sdk"
|
import ContentstackSDK from "@contentstack/app-sdk"
|
||||||
|
import React from "react"
|
||||||
|
|
||||||
import { ImageElement } from "~/components/ImageElement"
|
import { ImageElement } from "~/components/ImageElement"
|
||||||
|
|
||||||
import { Icon } from "@contentstack/venus-components"
|
import { Icon } from "@contentstack/venus-components"
|
||||||
import { openImageVault } from "~/utils/imagevault"
|
import { openImageVault } from "~/utils/imagevault"
|
||||||
|
|
||||||
import type { Lang } from "~/types/lang"
|
|
||||||
import type {
|
import type {
|
||||||
ContentstackEmbeddedData,
|
ContentstackEmbeddedData,
|
||||||
ContentstackPluginDefinition,
|
ContentstackPluginDefinition,
|
||||||
ExtractedContentstackEmbeddedData,
|
ExtractedContentstackEmbeddedData,
|
||||||
} from "~/types/contentstack"
|
} from "~/types/contentstack"
|
||||||
|
import type { Lang } from "~/types/lang"
|
||||||
|
|
||||||
function findThisPlugin(ext: ContentstackPluginDefinition) {
|
function findThisPlugin(ext: ContentstackPluginDefinition) {
|
||||||
return ext.type === "rte_plugin" && /imagevault/i.test(ext.title)
|
return ext.type === "rte_plugin" && /imagevault/i.test(ext.title)
|
||||||
@@ -180,7 +180,6 @@ async function init() {
|
|||||||
if (rte) {
|
if (rte) {
|
||||||
const savedSelection = rte?.selection?.get() ?? undefined
|
const savedSelection = rte?.selection?.get() ?? undefined
|
||||||
|
|
||||||
// @ts-expect-error: Added at runtime
|
|
||||||
const appConfig = await rte.getConfig()
|
const appConfig = await rte.getConfig()
|
||||||
|
|
||||||
// This is the configuration for this instance of the plugin.
|
// This is the configuration for this instance of the plugin.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { resolve } from "path"
|
import { resolve } from "path"
|
||||||
import { defineConfig } from "vite"
|
import { defineConfig } from "vite"
|
||||||
import tsconfigPaths from "vite-tsconfig-paths"
|
|
||||||
import { libInjectCss } from "vite-plugin-lib-inject-css"
|
import { libInjectCss } from "vite-plugin-lib-inject-css"
|
||||||
|
import tsconfigPaths from "vite-tsconfig-paths"
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [tsconfigPaths(), libInjectCss()],
|
plugins: [tsconfigPaths(), libInjectCss()],
|
||||||
@@ -16,7 +16,6 @@ export default defineConfig({
|
|||||||
entry: resolve(__dirname, "main.tsx"),
|
entry: resolve(__dirname, "main.tsx"),
|
||||||
name: "csiv",
|
name: "csiv",
|
||||||
fileName: () => "csiv.js",
|
fileName: () => "csiv.js",
|
||||||
// @ts-expect-error: 'system' not valid by typings, but works with Rollup
|
|
||||||
formats: ["system"],
|
formats: ["system"],
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user