GithubHelp home page GithubHelp logo

cloud-doc's Introduction

tips

  • remote 10.1.2版本中 remote 默认是关闭的,需要手动声明webPreferences: {enableRemoteModule: true}

  • typescript中启用css module,需要在react-app-env.d.ts中做以下声明:

declare module '*.module.less' {
  const css: { readonly [key: string]: string };

  export default css;
}
  • install electron electron因为需要安装chrome,所以需要翻墙,不要看网上那些使用镜像什么的,直接使用cnpm install即可,简单粗暴

  • 在 electron 中使用 react-devtools 调试 百度搜的话很多方法都已经失效了,最新的是在session.loadExtension,但是还是要翻墙去下载插件 最方便的办法是使用electron-devtools-installer,同时在main.js中使用:

const { default: installExtension, REACT_DEVELOPER_TOOLS } = require('electron-devtools-installer');

await installExtension(REACT_DEVELOPER_TOOLS);

注意:这个也必须有梯子才行,因为它其实也是在打开electron的时候才去下载这个扩展

  • 第三方 js 有一些第三方的 sdk 使用方式是直接在index.html中引入,这时候在typescript中使用会报错,提示window中没有这个对象 同样也是在react-app-env.d.tsdeclare一下即可。
declare var YpRiddler;

cloud-doc's People

Contributors

lz82 avatar

Watchers

 avatar  avatar

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.