x)- [x ] bug report -> please search issues before submitting
- [ ] feature request
npm -v
4.6.1
node -v
v6.10.0
webpack version 3.4.1
Following the documentation readme instructions, Adding this to webpack config file causes immediate compilation error
import {AotPlugin} from '@ngtools/webpack';
import {AotPlugin} from '@ngtools/webpack'
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
The import keyword is not supported by Node. You need to use require('@ngtools/webpack').
Ok but why doesn't it say that clearly in the documentation page? Its too much to assume people will know this. Please update docs with this explanation. Thanks
Same problem. Changed it to require and then I get
new AotPlugin({
^
TypeError: AotPlugin is not a constructor
Try - new AotPlugin.AotPlugin({})
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Same problem. Changed it to require and then I get
new AotPlugin({
^
TypeError: AotPlugin is not a constructor