I am using this plugin to generate sourcemaps for our CSS output but all it is outputting is the following.
{"version":3,"file":null,"sources":[],"sourcesContent":[],"names":[],"mappings":""}
Here is an example of our vite.config.js
import { defineConfig } from "vite";
import cssSourcemap from 'vite-plugin-css-sourcemap';
export default defineConfig({
plugins: [cssSourcemap({
enabled: true,
extensions: ['.scss', '.css'],
})],
build: {
cssMinify: true,
rollupOptions: {
input: "assets/scss/main.scss",
output: {
assetFileNames: `[name].[ext]`,
},
},
},
});
CSS is generated fine but mapping is not generated. Below is our package.json FYI.
{
"name": "sample",
"private": true,
"version": "0.0.Z",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build:watch": "vite build --watch",
"preview": "vite preview"
},
"devDependencies": {
"sass": "^1.89.2",
"vite": "^6.3.5",
"vite-plugin-css-sourcemap": "^1.0.2"
},
"dependencies": {
}
}
Hope someone can help or advise what might be happening here. I tried everything described in #3 and it didn't help.
I am using this plugin to generate sourcemaps for our CSS output but all it is outputting is the following.
Here is an example of our vite.config.js
CSS is generated fine but mapping is not generated. Below is our package.json FYI.
Hope someone can help or advise what might be happening here. I tried everything described in #3 and it didn't help.