Giter VIP home page Giter VIP logo

parcel-plugin-web-ext-tool's People

Contributors

dependabot[bot] avatar mmktomato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

parcel-plugin-web-ext-tool's Issues

Fails if extension lives in subdirectory

The example setup has manifest.json in the same directory as package.json, so web-ext finds it automatically. However, if the manifest is moved into a subdirectory extension (and parcel’s output is directed there using -d extension/dist), one would have to supply the sourceDir option to web-ext to ensure it finds it. I tried two approaches:

To try make this work, I added a line to package.json: "webExt": { "sourceDir": "extension" }. This makes the extension work when run directly using npx web-ext run (after running parcel build). But this option seems to be ignored by parcel-plugin-web-ext-tool, which only appears to load the config in webExt.run.

I therefore tried moving the option there: "webExt": { "run": { "sourceDir": "extension" } }. But this both appears to be invalid when invoking web-ext directly (unknown option: "sourceDir"), and using parcel-plugin-web-ext-tool still fails:

… installTemporaryAddon: Error: unknownError: Could not install add-on at './extension': [Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.initWithPath]" …

Any idea why this happens, or how to make it work when the extension lives in a subdirectory?

Incompatible with latest web-ext release (5.0.0)

When trying to use the plugin with the newly released web-ext 5.0, the plugin fails with the following error:

> [email protected] watch /path/to/my/project/
> parcel watch ./src/test.ts --public-url ./

✨  Built in 897ms.
(node:27221) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'cmd' of undefined
    at Bundler.<anonymous> (/path/to/my/project/node_modules/parcel-plugin-web-ext-tool/src/index.js:19:27)
(node:27221) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:27221) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
^C

Downgrading to web-ext 4.3.0 fixes the issue. Looking at the release notes for web-ext 5.0.0 it seems that their exports have changed.

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.