-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constant console spam about "options.css" #8009
Comments
Relevand discord thread |
svelte.config.js/** @type {import('@sveltejs/kit').Config} */
const config = {
vitePlugin: {
emitCss: false,
...
},
compilerOptions: {
css: "injected",
...
},
...
} If you get the following error after adding
|
as the warning says, i set in compilerOptions: {
css: 'external'
} After this the warning remains. |
is it possible to make these values the default? |
Fixed in 3.53.1 by just removing the warning for now. |
with svelte 4.0.1 the message has come back it reads:
|
Currently using Setting compilerOptions to |
@jerrygreen where are you setting the options? Can you send your config? |
Have the same issue with svelte 4.2.0 and it started with ^4.x versions
svetle.config.json set in the following way: import { vitePreprocess } from '@sveltejs/kit/vite';
import path from 'path';
import adapter from '@sveltejs/adapter-static';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess({ postcss: true }),
vitePlugin: {
inspector: true
},
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter({
// default options are shown. On some platforms
// these options are set automatically — see below
pages: 'build',
assets: 'build',
// fallback: null,
fallback: '200.html',
precompress: false,
strict: true
}),
alias: {
// these are the aliases and paths to them
'@components': path.resolve('./src/lib/components'),
'@lib': path.resolve('./src/lib'),
'@img': path.resolve('./src/img'),
'@utils': path.resolve('./src/lib/utils')
}
},
compilerOptions: {
css: 'external'
}
};
export default config; |
As a comment when using rollup, I upgraded rollup-plugin-svelte to latest (currently 7.2.2) and warnings went. |
Describe the bug
Whenever you start the dev server or make a change, you get multiple warnings pertaining to "options.css", even if you are just using the default config. Example:
This fills the console very quickly if you have many pages/files.
This is on sveltekit, but the error seems to be related to the latest update of this repo, 3.53.0, and this pull.
Reproduction
You can simply just create a new SvelteKit project and run the dev server.
StackBlitz doesn't use the latest version, and I am unsure of any other REPLs that do.
Logs
System Info
System: OS: macOS 12.6 CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz Memory: 477.12 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.11.0 - /usr/local/bin/node npm: 8.19.2 - /usr/local/bin/npm Browsers: Chrome: 107.0.5304.87 Firefox: 104.0.1 Safari: 16.0 npmPackages: svelte: ^3.44.0 => 3.53.0
Severity
annoyance
The text was updated successfully, but these errors were encountered: