Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lazy loaded and custom named scripts/styles #3401

Closed
filipesilva opened this issue Dec 5, 2016 · 1 comment · Fixed by #3402
Closed

Support lazy loaded and custom named scripts/styles #3401

filipesilva opened this issue Dec 5, 2016 · 1 comment · Fixed by #3402
Assignees

Comments

@filipesilva
Copy link
Contributor

Add support for outputting lazy loaded styles and scripts, and also to rename these. Global css should always be outputted as a CSS file, with no accompanying .js bundle.

Example configuration in angular-cli.json:

      "styles": [
        "styles.css",
        { "input": "named-style.scss" },
        { "input": "lazy-style.scss", "lazy": true },
        { "input": "pre-rename-style.scss", "output": "renamed-style" },
        { "input": "pre-rename-lazy-style.scss", "output": "renamed-lazy-style", "lazy": true },
        { "input": "common-entry.scss", "output": "common-entry" }
      ],
      "scripts": [
        "scripts.js",
        { "input": "named-script.js" },
        { "input": "lazy-script.js", "lazy": true },
        { "input": "pre-rename-script.js", "output": "renamed-script" },
        { "input": "pre-rename-lazy-script.js", "output": "renamed-lazy-script", "lazy": true },
        { "input": "common-entry.js", "output": "common-entry" }
      ],

This should output the following list of files inside dist/:

styles.css
named-style.css
lazy-style.css // not loaded in index.html
renamed-style.css
renamed-lazy-style.css // not loaded in index.html
common-entry.css
scripts.js
named-script.js
lazy-script.js // not loaded in index.html
renamed-script.js
renamed-lazy-script.js // not loaded in index.html
common-entry.js
@filipesilva filipesilva self-assigned this Dec 5, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 6, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 7, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 7, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Dec 9, 2016
filipesilva added a commit that referenced this issue Dec 9, 2016
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this issue Feb 9, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Feb 14, 2017
This was added back in angular#3401 but never documented.

Also cleans up duplicate docs in overview.
filipesilva added a commit that referenced this issue Feb 15, 2017
This was added back in #3401 but never documented.

Also cleans up duplicate docs in overview.

Close #4693
asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this issue Apr 12, 2017
This was added back in angular#3401 but never documented.

Also cleans up duplicate docs in overview.

Close angular#4693
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant