egoist / bili

Bili makes it easier to bundle JavaScript libraries.
https://bili.egoist.sh
MIT License
1.04k stars 61 forks source link

--vue.css dist/filename.css doesn't work after upgrading to 3.0.13 #109

Open MikaelEdebro opened 6 years ago

MikaelEdebro commented 6 years ago

I upgraded bili to latest version (3.0.13), to get access to the new config CLI argument. However, now I notice that it no longer respects the --vue.css dist/styles.css. Instead it names the css bundle with the same name as the js.

My npm script: bili --format cjs,es,umd,umd-min --plugin vue --vue.css dist/styles.css

Also, before when --vue.css was working as expected, it only created a unminified styles.css. Is there a flag for the rollup-plugin-vue to get minified output?

egoist commented 6 years ago

see https://github.com/vuejs/rollup-plugin-vue/issues/201

maybe you're using rollup-plugin-vue@4, try this flag --no-vue.css to make it work.

hiendv commented 5 years ago

So, how could I extract CSS from components if I use rollup-plugin-vue@4?

ly525 commented 5 years ago

@hiendv hope this link may be helpful for you: https://rollup-plugin-vue.vuejs.org/options.html#css, which works for me.

my bili.config.js is as follows:

"rollup-plugin-vue": "^4.7.2", "bili": "^3.4.0",

const vue = require('rollup-plugin-vue');

module.exports = {
  name: 'fe-vue-components',
  format: [
    'cjs',
    'es',
    'umd',
    'umd-min',
  ],
  compress: 'umd',
  plugins: [
    vue({
      css: false,
    }),
  ],
};