smelte-sapper-template
smelte-sapper-template copied to clipboard
Two minor issues: Change server.js and Circular dependency
Hi and thanks for a great template.
I have two small things...
- Perhaps the server.js could reflect the latest official server.js and only import the tailwind.css like this:
import sirv from 'sirv'; import polka from 'polka'; import compression from 'compression'; import * as sapper from '@sapper/server';
import "./tailwind.css";
const { PORT, NODE_ENV } = process.env; const dev = NODE_ENV === 'development';
polka() // You can also use Express .use( compression({ threshold: 0 }), sirv('static', { dev }), sapper.middleware() ) .listen(PORT, err => { if (err) console.log('error', err); });
- I get the following warnings:
• client Circular dependency: src\node_modules\@sapper\app.mjs -> src\node_modules\@sapper\internal\App.svelte -> src\routes\_layout.svelte -> src\node_modules\@sapper\app.mjs • server Circular dependency: src\routes\_layout.svelte -> src\node_modules\@sapper\app.mjs -> src\node_modules\@sapper\internal\App.svelte -> src\routes\_layout.svelte Circular dependency: src\routes\_layout.svelte -> src\node_modules\@sapper\app.mjs -> src\node_modules\@sapper\internal\manifest-client.mjs -> src\routes\_layout.svelte ✔