angular-cli

Using SCSS with angular library created using angular-cli

蓝咒 提交于 2021-02-09 07:00:23
问题 I have created an angular library project where I want to use SCSS for styles. So I have configured ng config schematics.@schematics/angular:component.styleext scss and this made an entry to angular.json file "schematics": { "@schematics/angular:component": { "styleext": "scss" } } Now I am using materialize-css UI library in my library components. And it requires to import its SCSS file. I am not seeing styles.scss file where I can import this and my components and other common styles? I

Angular 8 to 9 upgrade error when trying to build

我的未来我决定 提交于 2021-02-08 21:31:16
问题 I'm trying to upgrade from Angular 8 to 9 and I'm getting this error when I do ng build. It looks like the problem is in the babel package in vendor.js. [error] SyntaxError: C:\Dev\allverse3\ClientApp\vendor-es2015.js: 'with' in strict mode (139204:4) [0m [90m 139202 | [39m [33mWindow_run[39m[33m:[39m [36mfunction[39m _run(code[33m,[39m file) {[0m [0m [90m 139203 | [39m [36mif[39m (file) code [33m+=[39m [32m'\n//@ sourceURL='[39m [33m+[39m file[33m;[39m[0m [0m[31m[1m>[22m[39m[90m 139204 |

Angular 8 to 9 upgrade error when trying to build

牧云@^-^@ 提交于 2021-02-08 21:31:11
问题 I'm trying to upgrade from Angular 8 to 9 and I'm getting this error when I do ng build. It looks like the problem is in the babel package in vendor.js. [error] SyntaxError: C:\Dev\allverse3\ClientApp\vendor-es2015.js: 'with' in strict mode (139204:4) [0m [90m 139202 | [39m [33mWindow_run[39m[33m:[39m [36mfunction[39m _run(code[33m,[39m file) {[0m [0m [90m 139203 | [39m [36mif[39m (file) code [33m+=[39m [32m'\n//@ sourceURL='[39m [33m+[39m file[33m;[39m[0m [0m[31m[1m>[22m[39m[90m 139204 |

Exclude assets in production build

隐身守侯 提交于 2021-02-08 13:13:16
问题 I have some assets (images, styles) which I only need during development (ng serve). These assets must not be included in the production build. In production these assets are provided by a CDN. I need: ng serve should serve files contained in the folder ./assets-non-build but: ng build should not inculde the folder ./assets-non-build in the final build I have worked through 10 similar questions here on SO and 5 issues on github, they all deal with excluding files, but none solved my situation

Exclude assets in production build

ε祈祈猫儿з 提交于 2021-02-08 13:10:59
问题 I have some assets (images, styles) which I only need during development (ng serve). These assets must not be included in the production build. In production these assets are provided by a CDN. I need: ng serve should serve files contained in the folder ./assets-non-build but: ng build should not inculde the folder ./assets-non-build in the final build I have worked through 10 similar questions here on SO and 5 issues on github, they all deal with excluding files, but none solved my situation

Exclude assets in production build

旧时模样 提交于 2021-02-08 13:08:41
问题 I have some assets (images, styles) which I only need during development (ng serve). These assets must not be included in the production build. In production these assets are provided by a CDN. I need: ng serve should serve files contained in the folder ./assets-non-build but: ng build should not inculde the folder ./assets-non-build in the final build I have worked through 10 similar questions here on SO and 5 issues on github, they all deal with excluding files, but none solved my situation

Exclude assets in production build

风格不统一 提交于 2021-02-08 13:05:58
问题 I have some assets (images, styles) which I only need during development (ng serve). These assets must not be included in the production build. In production these assets are provided by a CDN. I need: ng serve should serve files contained in the folder ./assets-non-build but: ng build should not inculde the folder ./assets-non-build in the final build I have worked through 10 similar questions here on SO and 5 issues on github, they all deal with excluding files, but none solved my situation

possible to add crossorigin attribute to script tags generated by angular cli?

六眼飞鱼酱① 提交于 2021-02-07 14:42:46
问题 Is it possible to add crossorigin attribute to script tags generated by angular cli? when running my angular app, script tags are added to the end of my index.html: <script src="runtime-es2015.3d05cbd29d24231258bf.js" type="module"></script> <script src="polyfills-es2015.28da6787754ec8436843.js" type="module"></script> <script src="main-es2015.4106b7f4d43a05cb792d.js" type="module"></script> Is it possible to configure angular-cli so that when those tags are included in the build index.html,

possible to add crossorigin attribute to script tags generated by angular cli?

混江龙づ霸主 提交于 2021-02-07 14:42:12
问题 Is it possible to add crossorigin attribute to script tags generated by angular cli? when running my angular app, script tags are added to the end of my index.html: <script src="runtime-es2015.3d05cbd29d24231258bf.js" type="module"></script> <script src="polyfills-es2015.28da6787754ec8436843.js" type="module"></script> <script src="main-es2015.4106b7f4d43a05cb792d.js" type="module"></script> Is it possible to configure angular-cli so that when those tags are included in the build index.html,

Error: Cannot find module '@angular/compiler-cli

白昼怎懂夜的黑 提交于 2021-02-07 14:31:14
问题 I am getting the below mentioned error when I execute ng s --open command: Cannot find module '@angular/compiler-cli' Error: Cannot find module '@angular/compiler-cli' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:655:15) at Function.Module._load (internal/modules/cjs/loader.js:580:25) at Module.require (internal/modules/cjs/loader.js:711:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (G:\Front-End\angular\rapydly\node_modules@ngtools\webpack\src