Giter Club home page Giter Club logo

umi-chrome-extensions-template's Issues

backgroup打包后错误

backgroup.ts中如下
function testBackground(){
alert("调用了")
}

而打包后生成的backgroupjs 无法调用该方法 报错e.testBackground is not a function

开发环境依赖包冲突

yarn 安装

由于找不到 yarn.lock, 安装时只好全部选择最新的包

? Please choose a version of "typescript" from this list: 4.0.0-dev.20200701
[2/4] 🚚  Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "^10.17.0". Got "14.15.4"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

npm 安装

➜  umi-chrome-extensions-template git:(master) npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: antd@undefined
npm ERR! node_modules/antd
npm ERR!   antd@"^4.6.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer antd@"^4.x" from @ant-design/[email protected]
npm ERR! node_modules/@ant-design/pro-layout
npm ERR!   @ant-design/pro-layout@"^5.0.12" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/figure/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/figure/.npm/_logs/2021-01-22T04_06_45_490Z-debug.log

请问inject-script推荐放在哪里?

我的使用场景是:content-script会动态注入inject-script,inject-script也是使用ts,css使用less,这种情况下inject-script放在哪个目录合适?

popup 页面加载时提示错误

基于脚手架创建的插件,打开 popup 页面时,提示错误如下;
倒是不影响功能,不过总是有点碍眼;还请大神知悉;

看情况应该是 umijs 的依赖 阿里 CDN 上的资源;

Refused to load the script 'chrome-extension://at.alicdn.com/t/font_2357611_whan662da2.js' because it violates the following Content Security Policy directive: "script-src 'self' 'sha256-YM8uI2F+VfHULiDF1T+UCYmPwssvvWleyz5k2gtmTQo=' 'sha256-+lWedAM1kVPdV8EdccyVnyk5TRATyEpOrwBBAUk6ltM='". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.