Compatibility with AngularCompilerPlugin
See original GitHub issueIs this plugin compatible with AngularCompilerPlugin
? I keep getting the following error:
TypeError: Cannot read property 'data' of undefined
at setData (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-virtual-modules/index.js:79:15)
at VirtualFileSystemDecorator.compiler.inputFileSystem._writeVirtualFile (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-virtual-modules/index.js:108:9)
at VirtualModulesPlugin.writeModule (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-virtual-modules/index.js:59:34)
at /Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-virtual-modules/index.js:155:14
at Array.forEach (<anonymous>)
at afterResolversHook (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-virtual-modules/index.js:154:40)
at SyncHook.eval [as call] (eval at create (/Users/ben/projects/sopher.io/sites/webapp/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:5:1)
at SyncHook.lazyCompileHook (/Users/ben/projects/sopher.io/sites/webapp/node_modules/tapable/lib/Hook.js:154:20)
at WebpackOptionsApply.process (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack/lib/WebpackOptionsApply.js:541:33)
at webpack (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack/lib/webpack.js:57:48)
at processOptions (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-cli/bin/cli.js:272:16)
at /Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-cli/bin/cli.js:364:3
at Object.parse (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
at /Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-cli/bin/cli.js:49:8
at Object.<anonymous> (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:1123:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:972:32)
at Function.Module._load (internal/modules/cjs/loader.js:872:14)
at Module.require (internal/modules/cjs/loader.js:1012:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/ben/projects/sopher.io/sites/webapp/node_modules/webpack/bin/webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:1123:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:972:32)
at Function.Module._load (internal/modules/cjs/loader.js:872:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
This is an excerpt of the plugins in the webpack.config.js:
plugins: [
new VirtualModulesPlugin({
'node_modules/module-foo.js': 'module.exports = { foo: "foo" };'
}),
new AngularCompilerPlugin({
tsConfigPath: path.resolve(TSCONFIG),
sourceMap: SOURCE_MAPS
})
]
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Issue #186 · webpack-contrib/mini-css-extract-plugin - GitHub
Compatibility with AngularCompilerPlugin #186 ... I'm not able to use mini-css-extract-plugin with AngularCompilerPlugin (i.e., I'm not able to set ...
Read more >Angular Ahead-of-Time Webpack Plugin - npm
Angular version 5 and up, use AngularCompilerPlugin : ... The loader works with webpack plugin to compile your TypeScript.
Read more >ngtools/webpack AngularCompilerPlugin Configuration for ...
AngularCompilerPlugin when my project is a library project and therefore ... getDefaultExport function for compatibility with non-harmony ...
Read more >@ngtools/webpack NPM | npm.io
Angular version 5 and up, use AngularCompilerPlugin : import {AngularCompilerPlugin} ... The loader works with webpack plugin to compile your TypeScript.
Read more >Getting started with Webpack Ahead-of-Time Configuration
It works with AngularCompilerPlugin together to enable AOT compilation. Options for AngularCompilerPlugin. Add instance of AngularCompilerPlugin, which has an ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@neben @ScriptedAlchemy The compatibility with AngularCompilerPlugin is added via: #46. Published as
webpack-virtual-modules@0.2.2
This seems to be broken again. It outputs an empty script when AngularCompilerPlugin is used.