硫化1.14.7
我正在尝试在一个项目中使用纸张下拉菜单。在导入到我的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.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文件应该与其他所有内容连接在一起,但它并没有这样做。
发布于 2017-02-02 14:56:35
我也遇到了同样的问题并解决了它。
当vulcanize包含bower_components\neon-animation\web-animations.html时出现此问题
web-animations.html只包含一个标签:
<script src="../web-animations-js/web-animations-next-lite.min.js"></script>当您从js inlineScripts运行或执行命令--inline-scripts时,您所需要的就是将参数放到您的vulcanize中
此选项将用js文件内容替换脚本标记。它有助于将外部源包含到捆绑包中。
您确定在bower_components中有web-animations-js文件夹吗?
https://stackoverflow.com/questions/35833029
复制相似问题