Comments (3)
(fixed HTML fragment)
from webdev.
Hi @kevmoo I'm upgrading some things to Dart2/Angular5 this week and i just ran into the same thing. I have a global CSS file in one package that is supposed to be referenced from the web/index.html
of another. In Dart1/Angular2 (yeah its been a while since I upgraded), I could load the global CSS file from another package like this:
<link rel='stylesheet' type='text/css'
href='packages/ng_modular_admin/src/css/modular-admin.css'>
But now this file is not produced in the build directory. I noticed that .font
files and other arbitrary extensions like .dat
are copied into the build directory, so I guess that there's some special handling of CSS files but I'm not sure what I should do to declare that I want this CSS file to appear in the build output.
Also, somewhat ironically .scss
files are copied to the build directory even though they are not needed as build artifacts... Is there a way to configure which files get copied?
from webdev.
If you're using angular
then it ships with a cleanup builder which removes .html
and .css
files.
By default this is only enabled in release builds which is why you don't see it with webdev serve
- webdev serve
defaults to dev build while webdev build
defaults to release build.
This also only happens in lib/
. If you have a CSS file in web/
it shouldn't be cleaned up by angular.
Also, somewhat ironically .scss files are copied to the build directory even though they are not needed as build artifacts...
If you are using sass_builder
I would expect those to be cleaned up.
If you are compiling sass outside the build system instead and don't have sass_builder
in your deps then there isn't anything that would clean it up.
Is there a way to configure which files get copied?
Not directly. You can implement a new PostProcessBuilder
following the examples in angular and sass_builder
to clean up whatever file extensions you'd like.
from webdev.
Related Issues (20)
- Support running the `reload_test` with the `FrontendServer`
- Exceptions in Dart web apps pause with "PauseInterrupted" instead of "PauseException"
- Pause on Exceptions in Dart web apps jumps to the wrong location
- When debugging a webdev app from VS Code, hitting a breakpoint opens copy of actual file HOT 2
- Problems debugging `static` members
- [dwds] ext.flutter.debugDumpApp: (-32603) Unexpected DWDS error for callServiceExtension: Unexpected error from chrome devtools
- after upgrading to flutter 3.19.3 , I am getting the error below when I try to build and run on web. HOT 2
- Messaging has changed if pubspec yaml file not found by pub
- Test checking for DEBUGGER_READY and DEVTOOLS_LOAD events failing
- Breakpoints fail to work in Flutter web when macro experiment is enabled HOT 5
- `yieldControlToDDS` should disconnect non-DDS clients
- `dart:developer` `log` messages still get truncated in the middle HOT 1
- `webdev` integration test has begun failing with `pub` error
- Prevent stack trace calculation from being halted if any of the frames throws an error
- `.callServiceExtension` test failing for WebDev HOT 1
- Flutter Web Application UI Components Not Rendering in Chrome. HOT 3
- Vite proxied `flutter run -d chrome` does not respond with RunRequest HOT 1
- Remove unsound null safety options
- [documentation] documentation on how to compile dart to js for a non-web target with webdev build HOT 1
- Can't load debug build over https (upgrade websocket to secure) HOT 1
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 webdev.