crxjs / chrome-extension-tools

Bundling Chrome Extensions can be pretty complex. It doesn't have to be.
https://crxjs.dev/vite-plugin
2.9k stars 192 forks source link

Why can't resovle index.html while I don't have the config default_popup in manifest.json #659

Closed weijuer closed 1 year ago

weijuer commented 1 year ago

Build tool

Rollup

Where do you see the problem?

Describe the bug

Why can't resovle index.html while I don't have the config default_popup in manifest.json

A.without

  "action": {
  },

image

B.with

  "action": {
    "default_popup": "index.html"
  },

image

Reproduction

sorry for this option

Logs

A.without

vite v4.1.4 building for production...
✓ 7 modules transformed.
dist/service-worker-loader.js                                              0.05 kB
dist/assets/content-script-loader.content-script.ts-19252bbb-e8f3b2c0.js   0.20 kB      
dist/manifest.json                                                         0.99 kB      
dist/images/radio_64.png                                                   2.49 kB      
dist/images/radio_128.png                                                  4.59 kB      
dist/assets/content-script.ts-19252bbb.js                                  0.25 kB │ gzip: 0.18 kB
dist/assets/background.ts-60da3867.js                                     10.93 kB │ gzip: 3.47 kB

B.with

vite v4.1.4 building for production...
✓ 122 modules transformed.
dist/service-worker-loader.js                                               0.05 kB
dist/assets/content-script-loader.content-script.ts-19252bbb-e8f3b2c0.js    0.20 kB     
dist/index.html                                                             0.47 kB     
dist/manifest.json                                                          1.04 kB
dist/images/radio_64.png                                                    2.49 kB     
dist/images/radio_128.png                                                   4.59 kB     
dist/assets/radio-02e598a5.svg                                              5.44 kB     
dist/assets/Stations-c709f5b9.css                                           0.25 kB │ gzip:   0.17 kB
dist/assets/Radio-60d4d3b9.css                                              0.55 kB │ gzip:   0.31 kB
dist/assets/index-d80518a4.css                                              4.53 kB │ gzip:   1.50 kB
dist/assets/RadioService-2adf594f.css                                       5.29 kB │ gzip:   1.60 kB
dist/assets/_commonjsHelpers-725317a4.js                                    0.24 kB │ gzip:   0.18 kB
dist/assets/content-script.ts-19252bbb.js                                   0.25 kB │ gzip:   0.18 kB
dist/assets/About-160bb7ae.js                                               0.67 kB │ gzip:   0.46 kB
dist/assets/logger-88b47a55.js                                              1.05 kB │ gzip:   0.41 kB
dist/assets/Radio-eff7feb9.js                                               3.81 kB │ gzip:   1.87 kB
dist/assets/Stations-100312ab.js                                            6.27 kB │ gzip:   2.49 kB
dist/assets/background.ts-2755c5be.js                                      10.87 kB │ gzip:   3.49 kB
dist/assets/index.html-f9b1a8f2.js                                         97.45 kB │ gzip:  39.27 kB
dist/assets/RadioService-9cfd705a.js                                      486.40 kB │ gzip: 151.48 kB

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (4) x64 Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
    Memory: 5.17 GB / 15.91 GB
  Binaries:
    Node: 14.19.0 - C:\Weijuer\Developer\nodejs\node.EXE
    Yarn: 1.22.18 - C:\Weijuer\Developer\nodejs\yarn.CMD
    npm: 6.14.16 - C:\Weijuer\Developer\nodejs\npm.CMD
  Browsers:
    Chrome: 109.0.5414.120
    Edge: Spartan (44.22621.1265.0), Chromium (107.0.1418.56)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @crxjs/vite-plugin: ^1.0.14 => 1.0.14
    vite: ^4.1.4 => 4.1.4

Severity

blocking all usage of RPCE

jacksteamdev commented 1 year ago

@weijuer See the docs for using additional HTML pages: https://crxjs.dev/vite-plugin/concepts/pages

weijuer commented 1 year ago

@weijuer See the docs for using additional HTML pages: https://crxjs.dev/vite-plugin/concepts/pages

thks