lundi 29 juillet 2019

How to create EmberJS app and stick it into Chrome

I am trying to create a basic Ember app to then stick into a Chrome extension. I want the Chrome extension to takeover the newtab functionality. The end goal is to see the Ember Welcome App whenever I open a new tab.

Here is my manifest.json:

{
  "manifest_version": 2,
  "name": "My Cool Extension",
  "version": "0.1",
  "description": "Build an Extension!",
  "permissions": ["storage", "activeTab", "geolocation"],
  "background": {
    "scripts": ["background.js"]
  },
  "content_scripts": [
    {
      "matches": [
        "<all_urls>"
      ],
      "js": ["jquery-2.2.4.min.js", "content.js"]
    }
  ],
  "browser_action": {
    "default_icon": {
      "16": "icon.png"
    }
  },
  "chrome_url_overrides": { "newtab": "index.html" }
}

I am running Ember CLI 3.10 and this is a fresh EmberJS app. I ran ember build --environment production and copied over the dist folder into my chrome folder that contains my manifest.json. I'm referencing my built index.html file in my manifest.json. The problem I'm running into is that when I open a new page, I get UnrecognizedURLError: /index.html that originates from my fingerprinted vendor.js. Why is that? How can I fix this?




Aucun commentaire:

Enregistrer un commentaire