css file written to wrong output folder
See original GitHub issuemy config:
import svelte from 'rollup-plugin-svelte'
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
export default {
input: 'src/main.js',
output: {
file: 'js/main.min.js',
name: 'app',
format: 'iife'
},
plugins: [
svelte({
css: css => {
css.write('css/bundle.css', false);
}
}),
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs()
]
};
I expect that css.write('css/bundle.css', false);
writes the css file relative to the root folder. Actually it is writing it relative to the output folder of the js file: ‘js/css/bundle.css’.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How do I change sass output directory? - Stack Overflow
I want the sass output to go to the css folder, but each time I run sass watcher it creates a new css...
Read more >How to Fix CSS file is not Working with HTML in Chrome
Fix CSS file is not Working with HTML in Chrome | Problem Solved Show SupportBuy Me a COFFEE: https://buymeacoffee.com/Webjahin ...
Read more >HTML Styles CSS - W3Schools
Cascading Style Sheets (CSS) is used to format the layout of a webpage. ... External - by using a <link> element to link...
Read more >MiniCssExtractPlugin - webpack
This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS...
Read more >Dart Sass Command-Line Interface
By default, error CSS is enabled if you're compiling to at least one file on disk (as opposed to standard output). You can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Conduitry, it is definitely confusing and it doesn’t answer the question on how to achieve the desired behavior of @Gamadril at all? So how can the css file be in a css/ not js/css/ while the javascript file goes to js/?
We’re planning to remove the
css
option. A better way to handle is to emit the CSS styles into a virtual file (viaemitCss: true
), and have another Rollup plugin – for example,rollup-plugin-css-only
,rollup-plugin-postcss
, etc. – take responsibility for the new stylesheet.