Dart 包括图书馆和酒吧

Dart 包括图书馆和酒吧,dart,dart-pub,Dart,Dart Pub,如何使用pubspec.yaml在dart中包含前端库(例如引导库)?我已解决所有依赖项,但浏览器显示错误 拒绝应用“”中的样式,因为其MIME类型('text/html')不是受支持的样式表MIME类型,并且启用了严格的MIME检查 我的publispec.yaml如下所示: name: BC description: An absolute bare-bones web app. version: 0.0.1 #homepage: https://www.example.com #autho

如何使用
pubspec.yaml
在dart中包含前端库(例如引导库)?我已解决所有依赖项,但浏览器显示错误

拒绝应用“”中的样式,因为其MIME类型('text/html')不是受支持的样式表MIME类型,并且启用了严格的MIME检查

我的
publispec.yaml
如下所示:

name: BC
description: An absolute bare-bones web app.
version: 0.0.1
#homepage: https://www.example.com
#author: localroot <email@example.com>

environment:
  sdk: '>=1.20.1 <2.0.0'

#dependencies:
#  path: ^1.4.1

dependencies:
  path: ^1.4.1
  font_awesome: "^4.7.0"
  bootstrap: "^4.0.0"



dev_dependencies:
  browser: ^0.10.0
  dart_to_js_script_rewriter: ^1.0.1

transformers:
- dart_to_js_script_rewriter

# Uncomment the following in sdk 1.24+ to make pub serve
# use dartdevc (webdev.dartlang.org/tools/dartdevc).
#web:
#  compiler:
#    debug: dartdevc
。软件包如下所示:

# Generated by pub on 2018-06-25 21:00:42.860811.
args:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/args-1.4.3/lib/
async:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/async-1.13.3/lib/
barback:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/barback-0.15.2+15/lib/
bootstrap:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/bootstrap-4.0.0/lib/
browser:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/browser-0.10.0+3/lib/
charcode:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/charcode-1.1.1/lib/
collection:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.6/lib/
csslib:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/csslib-0.14.3/lib/
dart_to_js_script_rewriter:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/dart_to_js_script_rewriter-1.0.3/lib/
font_awesome:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/font_awesome-4.7.0/lib/
html:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/html-0.13.3/lib/
logging:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/logging-0.11.3+1/lib/
path:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.5.1/lib/
pool:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pool-1.3.4/lib/
source_span:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_span-1.4.0/lib/
stack_trace:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.9.2/lib/
utf:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/utf-0.9.0+3/lib/
BC:lib/

mime类型错误表明
pub-run-build\u-runner
未能生成您的代码。生成代码时没有错误,从引导中我只需要它的css类。我不想将其存储在我的电脑上,并且需要将其作为依赖项。依赖项存储在你的电脑上。我的意思是,我不想将其作为文件从引导站点加载,但将其作为发布依赖项使用。如果删除引导链接,页面是否正确显示?
# Generated by pub on 2018-06-25 21:00:42.860811.
args:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/args-1.4.3/lib/
async:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/async-1.13.3/lib/
barback:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/barback-0.15.2+15/lib/
bootstrap:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/bootstrap-4.0.0/lib/
browser:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/browser-0.10.0+3/lib/
charcode:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/charcode-1.1.1/lib/
collection:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.6/lib/
csslib:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/csslib-0.14.3/lib/
dart_to_js_script_rewriter:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/dart_to_js_script_rewriter-1.0.3/lib/
font_awesome:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/font_awesome-4.7.0/lib/
html:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/html-0.13.3/lib/
logging:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/logging-0.11.3+1/lib/
path:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.5.1/lib/
pool:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pool-1.3.4/lib/
source_span:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_span-1.4.0/lib/
stack_trace:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.9.2/lib/
utf:file:///C:/Users/localroot/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/utf-0.9.0+3/lib/
BC:lib/