Skip to content

Darvey/eagle-plugin-react-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project setup

To use this starter, simply replace the "id" and "name" fields in the manifest.json file.

you can retrieve a new id from the manifest.json file of a project that you created directly from Eagle

Installing the modules:

npm install

Development mode

Start the dev server with

npm run dev

Production

Create a build with the command:

npm run build

To make the project work with a new build, you will need to modify the index.html file. The part under 'dev-only' must be commented out. Conversely, the part under "prod-only" must be uncommented by changing 'index-file-name' to the name of the file that was generated during the build in the dist/assets/index...js folder

    <!-- dev-only -->
    <script type="module">
      import RefreshRuntime from 'http://localhost:5173/@react-refresh'
      RefreshRuntime.injectIntoGlobalHook(window)
      window.$RefreshReg$ = () => {}
      window.$RefreshSig$ = () => (type) => type
      window.__vite_plugin_react_preamble_installed__ = true
    </script>
    <script type="module" src="http://localhost:5173/@vite/client"></script>
    <script type="module" src="http://localhost:5173/index.jsx"></script>

    <!-- prod-only -->
    <!-- <script type="module" src="dist/assets/index-file-name.js"></script> -->

About

Create an Eagle plugin with React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors