Skip to content

version 7.0.0 compilerOptions breaks preprocess #160

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

Closed
jacobdalamb opened this issue Nov 25, 2020 · 10 comments
Closed

version 7.0.0 compilerOptions breaks preprocess #160

jacobdalamb opened this issue Nov 25, 2020 · 10 comments

Comments

@jacobdalamb
Copy link

jacobdalamb commented Nov 25, 2020

This is the repo I'm using with tailwindcss and sapper-rollup template from https://github.com/andrasbacsai/sapper-tailwind-starter. I ran npm run dev and got this error:
Screen Shot 2020-11-25 at 09 29 35

@Conduitry
Copy link
Member

The current template in https://github.com/sveltejs/template, which can be converted to TypeScript mode, uses version 7 of this plugin as well as a preprocessor, and works fine. The official Sapper template hasn't been updated yet.

We obviously can't make any guarantees about any third party template. Updating to version 7 of this plugin won't be as simple as just updating your package.json (that's what it means to be a breaking change), and any updates will be the responsibility of the maintainers of that template.

@lukeed
Copy link
Member

lukeed commented Nov 25, 2020

You need to move the config keys into compilerOptions namespace inside your rollup.config.js file

svelte({
--  dev,
--  hydratable: true,
--  emitCss: true,
++ compilerOptions: {
++   dev,
++   hydratable: true,
++   emitCss: true,
++ },
  preprocess
}),

You have two of these – one in client and server options.

@benmccann
Copy link
Member

Here's a PR to upgrade sapper-template that you can use as an example: sveltejs/sapper-template#289

@jacobdalamb
Copy link
Author

jacobdalamb commented Nov 25, 2020

You need to move the config keys into compilerOptions namespace inside your rollup.config.js file

svelte({
--  dev,
--  hydratable: true,
--  emitCss: true,
++ compilerOptions: {
++   dev,
++   hydratable: true,
++   emitCss: true,
++ },
  preprocess
}),

You have two of these – one in client and server options.

yeah I did that in the repo.... also if I add emitCss: true, it doesn't recognize it

@jacobdalamb
Copy link
Author

Most people read the repo before suggesting a solution

@lukeed
Copy link
Member

lukeed commented Nov 25, 2020

Most people don't include useless links in their report.
"I'm using X ... but not really"

@benmccann
Copy link
Member

I was able to reproduce this and saw a couple other people report it on Discord. Unfortunately, I'm not quite sure where the error is coming from. It's unclear to me that it's coming from rollup-plugin-svelte. Sapper's error messages are useless when running npm run dev and I can't reproduce this with npm run build, which means it's next to impossible to debug. I think I would advise just sticking to 6.0.0 for now and we'll make sure 7.0.0 works with SvelteKit. I don't really want to sink time into fixing Sapper's error handling when Sapper is going away

@jacobdalamb
Copy link
Author

I was able to reproduce this and saw a couple other people report it on Discord. Unfortunately, I'm not quite sure where the error is coming from. It's unclear to me that it's coming from rollup-plugin-svelte. Sapper's error messages are useless when running npm run dev and I can't reproduce this with npm run build, which means it's next to impossible to debug. I think I would advise just sticking to 6.0.0 for now and we'll make sure 7.0.0 works with SvelteKit. I don't really want to sink time into fixing Sapper's error handling when Sapper is going away

wait what do you mean sapper is going away?

@antony
Copy link
Member

antony commented Nov 25, 2020

@benmccann
Copy link
Member

This looks to be an issue in Svelte core: sveltejs/svelte#5722

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants