smelte-sapper-template icon indicating copy to clipboard operation
smelte-sapper-template copied to clipboard

Two minor issues: Change server.js and Circular dependency

Open christofer-f opened this issue 4 years ago • 0 comments

Hi and thanks for a great template.

I have two small things...

  1. 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); });

  1. 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 ✔

christofer-f avatar May 14 '20 10:05 christofer-f