You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constwebpackConfig={entry: "/path/to/virtual/file/module.js",plugins:[newVirtualModulePlugin({moduleName: "/path/to/virtual/file/module.js",contents: `// here is the javascript code`})]}
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.
Activity
axetroy commentedon Mar 10, 2018
I try it in webpack@4, It seem not work
rmarscher commentedon Mar 11, 2018
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.
axetroy commentedon Mar 12, 2018
Here is the relative issue webpack/webpack#6437
I have try it in entry point, and it didn't work.
develar commentedon Mar 18, 2018
It works for webpack 3, but broken since webpack 4.
ccfe commentedon Aug 21, 2019
has plan to fix this in webpack4 ?
dennisreimann commentedon Aug 24, 2019
fyi: This plugin works for me with Webpack 4: webpack-virtual-modules