ixrock / XTranslate

Easy translate text on web pages (chrome extension)
https://chrome.google.com/webstore/detail/xtranslate/gfgpkepllngchpmcippidfhmbhlljhoo
117 stars 28 forks source link

npm run build not create `user-script.js` file #80

Closed anigkus closed 9 months ago

anigkus commented 10 months ago

➜ XTranslate git:(master) npm run build


ERROR in ./src/user-script/user-script.tsx 27:0-20
Module not found: Error: Can't resolve '../../refs' in '/Users/XTranslate/src/user-script'
resolve '../../refs' in '/Users/XTranslate/src/user-script'
  using description file: /Users/XTranslate/package.json (relative path: ./src/user-script)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /Users/XTranslate/package.json (relative path: ./refs)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/XTranslate/refs doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/XTranslate/refs.ts doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        /Users/XTranslate/refs.tsx doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/XTranslate/refs.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/XTranslate/refs.json doesn't exist
      .scss
        Field 'browser' doesn't contain a valid alias configuration
        /Users/XTranslate/refs.scss doesn't exist
      .css
        Field 'browser' doesn't contain a valid alias configuration
        /Users/XTranslate/refs.css doesn't exist
      .txt
        Field 'browser' doesn't contain a valid alias configuration
        /Users/XTranslate/refs.txt doesn't exist
      .md
        Field 'browser' doesn't contain a valid alias configuration
        /Users/XTranslate/refs.md doesn't exist
      as directory
        /Users/XTranslate/refs doesn't exist

webpack 5.76.3 compiled with 1 error in 26417 ms
ixrock commented 9 months ago

Some internal issue..

anigkus commented 9 months ago

Some internal issue..

Import: not create user-script.js file

a0s commented 9 months ago

Comment out import "../../refs"; in src/user-script/user-script.tsx to override this issue