Comments (7)
Opening local html page means install/ update page?
Can you please share a reproduceable repo. I will be able to help quickly. Thanks
from vite-vue3-chrome-extension-v3.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';">
<title>Word Cloud</title>
</head>
<body>
<div id="app"></div>
<script src="script.js"></script>
</body>
</html>
from vite-vue3-chrome-extension-v3.
It can't find script.js in the same directory.
from vite-vue3-chrome-extension-v3.
const url = chrome.runtime.getURL('src/components/wordcloud.html');
console.log('URL:', url);
chrome.tabs.create({ url: url }, (tab) => {
if (chrome.runtime.lastError) {
console.error(chrome.runtime.lastError);
} else {
console.log('Tab created:', tab);
}
});
from vite-vue3-chrome-extension-v3.
You should try using relative path for script, i.e. ./script.js
from vite-vue3-chrome-extension-v3.
I was wrong before, the error is not about not finding the file but about the following error
from vite-vue3-chrome-extension-v3.
You are trying to use import statements inside static html page and scripts, which are not supported. Either add bundler (vite) processing for install and upgrade page or use simple scripts.
from vite-vue3-chrome-extension-v3.
Related Issues (20)
- [Feature] Add DaisyUI
- content-script does not use iframe, style issue HOT 2
- How do I quickly apply changes from this repository to my plugin? HOT 1
- [Feature] Add offscreen document sample
- [Feature] Support live reload for Install & Update pages
- Scripts should use `module` type
- [TODO] migrate to unplugin-vue-router
- [Feature] Add tailwind prettier plugin class support
- [Feature] Add oxc plugin for vscode
- Add Prefix To Isolate Source Website And Our Plugin HOT 7
- Switch to chrome-types
- Add vue devtools vite plugin HOT 12
- Global error handling to avoid extension context issues HOT 1
- Source files (.ts) in dist folder HOT 7
- TODO Update to Vite 5 HOT 2
- Fix for the src problem HOT 6
- Migrate to Nuxt
- it seems like extendRoutes has been removed in Vue Router 4.x. HOT 2
- error when starting the project: __DISPLAY_NAME__ is not defined HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vite-vue3-chrome-extension-v3.