Comments (5)
Node module packages should not be imported using relative paths. This rule applies to both JavaScript and CSS files in application and library builders.
Incorrect:
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
Correct:
@import '@syncfusion/ej2-base/styles/material.css';
from angular-cli.
Hi @alan-agius4 ,
Thanks for the update still facing same issues.
from angular-cli.
Out of curiosity, why not include the CSS in the global stylesheet of the application? It seems like the referenced CSS is intended for global use rather than being tied to a specific component. Importing it directly into a component could significantly increase its size, especially if these stylesheets are also used in other components.
I tried building this locally, but it seems that one of the stylesheets isn't exported correctly:
✘ [ERROR] Could not resolve "@syncfusion/ej2-angular-schedule/styles/material.css"
<stdin>:9:8:
9 │ @import '@syncfusion/ej2-angular-schedule/styles/material.css';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The path "./styles/material.css" is not exported by package "@syncfusion/ej2-angular-schedule":
../../node_modules/@syncfusion/ej2-angular-schedule/package.json:43:13:
43 │ "exports": {
from angular-cli.
why not include the CSS in the global stylesheet of the application?
We would like to contain the required styles for the scheduler component in the library itself, as well as the referenced styles is for scheduler dependent styles as it implements and holds other components in it.
I tried building this locally, but it seems that one of the stylesheets isn't exported correctly:
You can add:
@import '@syncfusion/ej2-schedule/styles/material.css';
instead
@import '@syncfusion/ej2-angular-schedule/styles/material.css';
from angular-cli.
This approach seems quite inefficient for both build and runtime performance, unless these stylesheets aren't used by any other components in the application. Otherwise, it could lead to redundant stylesheet processing and duplicate styles in the bundles.
For context, the ScheduleComponent
alone is surprisingly 4.1MB in size 😲!
The styles appear to be applied correctly:
However, given the complexity of the component's styles, it’s hard to determine which styles might not be applied. To address this, identify and focus the bare minimum styles required to show case the problem, create a minimal reproduction to investigate further. Then you can push this repository to github and link it here.
from angular-cli.
Related Issues (20)
- Simbols not supported on Dir HOT 2
- BUG: The document object is not available in this context after upgrading to 18.2.0-next.3 HOT 3
- Live reloading not working after changes Angular 17 HOT 1
- `ng build` throws on `import inspector from 'node:inspector';` on gentoo default node.js install HOT 1
- Command `ng build` fails behind corporate proxy HOT 2
- Build watch EPERM operation not permitted, copyfile on second emit HOT 2
- --stats-json to allow giving stats to both server and browser, separately HOT 1
- Update component schematic to 'export default class' by default HOT 1
- Option 'declarationDir' cannot be specified with option 'outFile'. HOT 1
- Schematic input does not validate against the Schema HOT 1
- generate component: Add an option to fine-tune the inclusion of lifecycle hooks HOT 1
- Typescript cannot find module that was defined in "paths" tsconfig.app.json HOT 1
- Support Custom Loaders for File Extensions in@angular-devkit/build-angular:browser-esbuild HOT 1
- Followup of #24916 ng serve often caches old component code HOT 4
- Report which route failed during pre-rendering.
- support playwright in ng e2e HOT 1
- `ng test` runs multiple instances of the browser HOT 5
- Add more feature to generation schematics HOT 1
- Transitive dependencies hoisted by rollup cause warnings when importing libraries with multiple chunks HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-cli.