Merge pull request #46 from sveltejs/chore/sirv

Chore: Solve FAQ/troubles w/ `sirv-cli` usage
This commit is contained in:
Rich Harris 2019-06-16 20:34:59 -04:00 committed by GitHub
commit 86495b4e30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View file

@ -9,14 +9,16 @@
"rollup-plugin-node-resolve": "^4.2.3", "rollup-plugin-node-resolve": "^4.2.3",
"rollup-plugin-svelte": "^5.0.3", "rollup-plugin-svelte": "^5.0.3",
"rollup-plugin-terser": "^4.0.4", "rollup-plugin-terser": "^4.0.4",
"sirv-cli": "^0.4.0",
"svelte": "^3.0.0" "svelte": "^3.0.0"
}, },
"dependencies": {
"sirv-cli": "^0.4.4"
},
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",
"autobuild": "rollup -c -w", "autobuild": "rollup -c -w",
"dev": "run-p start:dev autobuild", "dev": "run-p start:dev autobuild",
"start": "sirv public", "start": "sirv public --single",
"start:dev": "sirv public --dev" "start:dev": "sirv public --single --dev"
} }
} }

View file

@ -6,12 +6,12 @@
<title>Svelte app</title> <title>Svelte app</title>
<link rel='icon' type='image/png' href='favicon.png'> <link rel='icon' type='image/png' href='/favicon.png'>
<link rel='stylesheet' href='global.css'> <link rel='stylesheet' href='/global.css'>
<link rel='stylesheet' href='bundle.css'> <link rel='stylesheet' href='/bundle.css'>
</head> </head>
<body> <body>
<script src='bundle.js'></script> <script src='/bundle.js'></script>
</body> </body>
</html> </html>