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
When I build my app for production, using enableProdMode() and this: npm run build && browserify -s main app/main.js > app/bundle.js
On load I get:
Error: (SystemJS) Unexpected value 'Typeahead' declared by the module 'AppModule'
This doesn't happen when I build it without browserify. Not very familiar with browserify, but it seems to be pruning a dependency on Typeahead, which I actually need.
In systemjs.config.js, the map section (npm points to node_modules): 'ng2-typeahead': 'npm:ng2-typeahead',
In the packages section: 'ng2-typeahead': { main: './index', defaultExtension: 'js' }
In dependencies in package.json: "ng2-typeahead": "^1.2.0",
At the top of app.module.ts: import { Typeahead } from 'ng2-typeahead';
In the @NgModule: declarations: [ AppComponent, ContentDisplayComponent, EllipsisPipe, Typeahead ],
And in the subcomponent that actually uses it (which is probably overkill): import { Typeahead } from 'ng2-typeahead';
The text was updated successfully, but these errors were encountered:
When I build my app for production, using enableProdMode() and this:
npm run build && browserify -s main app/main.js > app/bundle.js
On load I get:
This doesn't happen when I build it without browserify. Not very familiar with browserify, but it seems to be pruning a dependency on Typeahead, which I actually need.
In systemjs.config.js, the map section (npm points to node_modules):
'ng2-typeahead': 'npm:ng2-typeahead',
In the packages section:
'ng2-typeahead': { main: './index', defaultExtension: 'js' }
In dependencies in package.json:
"ng2-typeahead": "^1.2.0",
At the top of app.module.ts:
import { Typeahead } from 'ng2-typeahead';
In the @NgModule:
declarations: [ AppComponent, ContentDisplayComponent, EllipsisPipe, Typeahead ],
And in the subcomponent that actually uses it (which is probably overkill):
import { Typeahead } from 'ng2-typeahead';
The text was updated successfully, but these errors were encountered: