本文介绍了Plunker给了我几天前有效的脚本404s的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
几周前,我做了个矮胖子,一切进展顺利.
I made a plunker a few weeks ago and everything was going well.
但是今天当我重新访问它时,我的脚本遭到404轰炸,您知道发生了什么变化吗?
However today when I revisited it I am bombarded by 404s on my scripts, any idea on what changed?
http://plnkr.co/edit/M2hRaf?p=preview
这是index.html的样子
Here is what the index.html looks like
<!DOCTYPE html>
<html>
<head>
<base href="." />
<script type="text/javascript" charset="utf-8">
window.AngularVersionForThisPlunker = 'latest'
</script>
<title>angular playground</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="style.css" />
<script src="https://unpkg.com/[email protected]/client/shim.min.js"></script>
<script src="https://unpkg.com/zone.js/dist/zone.js"></script>
<script src="https://unpkg.com/zone.js/dist/long-stack-trace-zone.js"></script>
<script src="https://unpkg.com/[email protected]/Reflect.js"></script>
<script src="https://unpkg.com/[email protected]/dist/system.js"></script>
<script src="config.js"></script>
<script>
System.import('app')
.catch(console.error.bind(console));
</script>
</head>
<body>
<my-app>
Loading...
</my-app>
</body>
</html>
推荐答案
那是因为您的插件现在使用最新的rxjs版本,并且最近有很多更改.
That's because your plunker now uses latest rxjs version and there were a lot of changes lately.
因此,请尝试更新您的配置,例如:
So try updating your config like:
System.config({
...
map: {
...,
'rxjs': 'npm:rxjs',
'rxjs-compat': 'npm:rxjs-compat',
'rxjs/operators': 'npm:rxjs/operators',
},
packages: {
...,
'rxjs': { main: 'index.js', defaultExtension: 'js' },
'rxjs/operators': {main: 'index.js', defaultExtension: 'js' }
}
...
Forked Plunker
这篇关于Plunker给了我几天前有效的脚本404s的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!