Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Vue throwing warning in console because __VUE_OPTIONS_API__ and __VUE_PROD_DEVTOOLS__ are not definede #699

Merged
merged 5 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dist/
# misc
.DS_Store
*.pem
.idea

# debug
npm-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion cli/create-plasmo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-plasmo",
"version": "0.81.1",
"version": "0.82.0",
"description": "Create Plasmo Framework Browser Extension",
"main": "dist/index.js",
"bin": "bin/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion cli/plasmo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plasmo",
"version": "0.81.1",
"version": "0.82.0",
"description": "The Plasmo Framework CLI",
"publishConfig": {
"types": "dist/type.d.ts"
Expand Down
2 changes: 2 additions & 0 deletions cli/plasmo/templates/static/common/vue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
globalThis.__VUE_OPTIONS_API__ = true
globalThis.__VUE_PROD_DEVTOOLS__ = process.env.NODE_ENV !== "production"
2 changes: 2 additions & 0 deletions cli/plasmo/templates/static/vue3/content-script-ui-mount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import type {
PlasmoCSUIHTMLContainer
} from "~type"

import "@plasmo-static-common/vue"

// @ts-ignore
import RawMount from "__plasmo_mount_content_script__"
// @ts-ignore
Expand Down
4 changes: 3 additions & 1 deletion cli/plasmo/templates/static/vue3/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// @ts-nocheck
import { createApp } from "vue"

// @ts-ignore
import * as Component from "__plasmo_import_module__"

import "@plasmo-static-common/vue"

document.addEventListener("DOMContentLoaded", () => {
const app = createApp(Component.default)
Component.default.prepare?.(app)
Expand Down