Use Helium to discover unused css classes in Angular

Asked

Viewed 75 times

0

I’m trying to use the Helium to discover unused classes in my css.

I imported it into my index.html:

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/helium-css/1.1/helium.min.js" onload="helium.init()"></script>

However the textarea is not shown as indicated in the documentation and I have the following error in the console:

Uncaught Typeerror: Cannot read Property 'appendchild' of Undefined At Object.generateCSS (Helium.min.js:1)

Has anyone ever managed to use the Helium in Angular? I’m forgetting something?

Edit:

I managed to bring out the textarea using the async in the script import, but when I put the page link I want to check "http://localhost:4200/login" and click Start it just reload the page and add the textarea, showing on the console:

Cannot read Property 'Sort' of Undefined

  • Which version of the angler you are using?

  • @Rafaelrotiroti version 6

  • Are you using any bundler? (webpack, Parcel)

  • How do I find this out? I found it in sources: (window["webpackJsonp"] = window["webpackJsonp"] || []).

  • Try to put this file js inside the archive angular-cli.json within the feasibility of scripts. And call the init inside the AppComponent.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.