Giter Club home page Giter Club logo

forge-externals-plugin's People

Contributors

joelsonm avatar mes-indesign avatar timfish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

forge-externals-plugin's Issues

Works for main process, but not renderer, or forked processes.

Hello,
I found out about this package via this issue from the ElectronForge page that I filed:

electron/forge#2949

If you read down a bit, your plug-in fixes the case when I package a native dependency invoked from the main process. However, if I move the code to the renderer.ts process, it cannot find serialport (warning from the browser); nor if I import serialport from a forked process from main, it also cannot find it (no native module exists...).

I only filed an issue with a simple bug because my main application is several years old and has grown quite a bit, but I can include portions if it would help you debug?

E.g., my webpack.main.config.js contains this:

module.exports = {
  /**
   * This is the main entry point for your application, it's the first file
   * that runs in the main process.
   */
  entry: {
    'index': './src/main/index.ts',
    'worker-thread': './src/framework/worker-thread.ts',
    'worker-thread-lpm01a': './src/framework/device-manager/lpm01a/worker-thread.ts'
  },
  output:{
    filename: '[name].js',
  },
  module: {
    rules: require('./webpack.rules'),
  },
  // Need this so that we can build "worker-thread" which has Vue/Pug in it
  plugins: plugins,
  resolve: {
    extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
  },
  externals: {
    serialport: "serialport",
  }
};

And as you can probably guess, worker-thread-lpm01a is forked from worker_thread, which is forked from index (main) and then imports serialport.

Issue with scoped package

Hi,
I want to use the plugin with a @Scoped native package. In this case, it does not work. yarn start works fine but the packaged version does not contain the scoped native package.
Thanks.

getHook is deprecated?

Hi,

I'm using electron-forge 6.1 with webpack and native modules.
I found my native module doesn' t included in the package, so I installed this plugin.
It was loaded but does nothing.

I read Writing Plugins and turned out that getHook may be deprecated and changed to getHooks. Changing getHook to getHooks as follows fixed the probrem.

  getHooks() {    
    return {
      resolveForgeConfig: this.resolveForgeConfig,
    };
  }

This is very tiny change, so I write to here. If you prefer, I can send a PR.

Best regards,

serialport submodules

@timfish

I found an cenario where scoped subdependencies of serialport(Eg: @serialport/parser-byte-length) wasn't included on node_modules after forge package.

Please review the change adding the split case of foundModules so we could publish an fix version.

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.