How to add external libs to webpack.2 , angular-cli 1.0.0-beta11
See original GitHub issuePlease provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Mac OSX El Capitan
- Versions. Please run
ng --version
. If there’s nothing outputted, please run in a Terminal:node --version
and paste the result here:
1.0.0-beta.11-webpack.2
- Repro steps. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.
I am trying to add charts.js to angular 2 RC5. But after doing npm installs and referencing the script directly into index.html like this
<script src="node_modules/chart.js/dist/Chart.bundle.min.js"></script>it does not get picked up and gives error of not found in console. What is the way to load external scripts in newest version?
- The log given by the failure. Normally this include a stack trace and some more information.
- Mention any other details that might be useful.
Thanks! We’ll be in touch soon.
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (1 by maintainers)
Top Results From Across the Web
How to add css library to project generated with angular-cli ...
To upgrade from 1.0.0-beta.11-webpack.2 to 1.0.0-beta.11-webpack.3 , run: npm uninstall -g angular-cli npm cache clean npm install -g ...
Read more >angular/angular-cli - Gitter
Does anyone use jQuery or external libs in angular-cli 1.0.0-beta.11-webpack.2 successfully ? Could you please share with me about your tips ~!.
Read more >How to include assets from node_modules in angular cli project
How to include assets from external library into Angular CLI project ... If your angular-cli version is greater than 1.0.0-beta.11-webpack, then you should ......
Read more >Angular-CLI Meets Webpack. the single greatest improvement ...
We'll build a quick Material 2 demo with a few md-components using these libraries: angular-cli beta-11 (circa: “1.0.0-beta.11-webpack.2”) ...
Read more >Externals - webpack
For example, to include jQuery from a CDN instead of bundling it: index.html ... For example, if the external library is a CommonJS...
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 Free
Top 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
if using webpack, then pretty much all libraries should be able to be included with a simple
const jQuery = require('jquery')
and nothing more. Not even typings.That was an example, just add your library name…
On Fri, Aug 12, 2016, 18:43 LunicLynx notifications@github.com wrote: