硫化 1.14.7
我正在尝试在项目中使用 paper-dropdown-menu。在导入到我的 index.html 中的 components.html 文件上使用 vulcanize。Vulcanize 可以正确连接除 web-animations.js 文件之外的所有适当文件。我在浏览器控制台中收到以下错误。
http://localhost:9005/bower_components/web-animations-js/web- animations-next-lite.min.js
Failed to load resource: the server responded with a status of 404 (Not Found)
此错误源于硫化文件。
<script src="../../bower_components/web-animations-js/web-animations-next-lite.min.js"></script>
就在不透明动画的定义之上
Polymer({
is: 'opaque-animation',
我正在使用以下配置对 gulp 进行硫化
gulp.task('web_components', () =>
gulp.src(config.paths.webComponentIndex)
.pipe(vulcanize({
abspath: config.paths.dist,
excludes: [],
inlineScripts: true,
stripExcludes: false
}))
.pipe(gulp.dest(config.paths.dist))
);
config.paths.dist 是我的 dist 目录,webComponentIndex 当然是捆绑的输出文件,它可以正确捆绑除此动画文件之外的所有内容。如果我正确理解了这个过程,那么该 animations.js 文件应该与其他所有内容一起连接,但它没有这样做。