Can I use virtual module as entry point? · Issue #22 · rmarscher/virtual-module-webpack-plugin · GitHub
Skip to content

Can I use virtual module as entry point? #22

Open

Description

@axetroy
const webpackConfig = {
      entry: "/path/to/virtual/file/module.js",
      plugins:[
        new VirtualModulePlugin({
          moduleName: "/path/to/virtual/file/module.js",
          contents: `// here is the javascript code`
        })
      ]
    }

Activity

  1. axetroy commented on Mar 10, 2018

    @axetroy
    Author

    I try it in webpack@4, It seem not work

    ERROR in Entry module not found: Error: Can't resolve '/path/to/virtual/file/module.js' in 'xxx'
    
  2. rmarscher commented on Mar 11, 2018

    @rmarscher
    Owner

    Ok. I haven’t tried that before. I should test it with webpack 2 to see if it has ever worked with this plugin. Let me know if you get a chance - should be easy to modify the example for webpack-2 in here to test. Thanks.

  3. axetroy commented on Mar 12, 2018

    @axetroy
    Author

    Here is the relative issue webpack/webpack#6437

    I have try it in entry point, and it didn't work.

  4. develar commented on Mar 18, 2018

    @develar

    It works for webpack 3, but broken since webpack 4.

  5. ccfe commented on Aug 21, 2019

    @ccfe

    has plan to fix this in webpack4 ?

  6. dennisreimann commented on Aug 24, 2019

    @dennisreimann

    fyi: This plugin works for me with Webpack 4: webpack-virtual-modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions