[Vuejs]-VueJS Rollup export multiple scss resources

0👍

I guess I just rubberducked myself. After posting this I noticed an example config with multiple export entries so I added a config entry with theme.scss as input. The output is like expected.

1 thing I don’t like is that the build process triggers a warning

The emitted file "theme.css" overwrites a previously emitted file of
the same name.

Meaning the output is written twice, I don’t know why that happens or if it can be ignored.

const cssOnlyConfig = {
  input: 'src/assets/theme.scss',
  output: {
    file: 'dist/theme.css',
    format: 'es',
    exports: 'default'
  },
  plugins: [
    postcss({
      modules: false,
      extract: true
    }),
    vue({
      css:true,
    }),
  ],
};

Leave a comment