Closed oskar-gmerek closed 1 year ago
Adding one more step for setting up the allow list causes fewer side effects.
The main reason for placing master.css.*
in the root directory is that Language Service and ESLint Plugin grab configuration files from the root directory by default. Once the file location of master.css.*
changes, you will have to pay more attention and manually specify the configuration of both.
@oskar-gmerek Thx for your report! The documentation has been updated https://beta.css.master.co/docs/installation/svelte
:tada: This issue has been resolved in version 2.0.0-beta.204 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 2.0.0-rc.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Current
Currently
masterCSS
and all masterCSS tools are looking for configuration file (master.css.ts
) in the main folder of project. This is usual place for config files, but because we importing that config, that create a problem in vite context. Vite autodetects a root of project (which is src folder in the svelte context) and limiting importing files to this folder, deny all imports below it and throwing error:masterCSS (and tools) looks for
master.css.ts
in:Above will fulfill a masterCSS side, but will throw error about importing file outside of allow list of Vite.
Expected
masterCSS (and tools) should looks for
master.css.ts
in:This will be inside allow list of Vite, but currently is not detected by masterCSS (and tools). This is also the place from where
master.css.ts
is imported in the guides of integration of masterCSS with Svelte and is leading to many errors just after following a guide.npx mcss init
should also detect sveltekit, and create config file insrc
folder.Probably the best for DX will be:
/
and/src/
.mcss
config file to change a path tomaster.css.*
file for edge cases.All above is in context of SvelteKit, but I believe there is more cases where above apply.