egoist / bili

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

Scss parsing errors since 3.0.7 #106

Open gustav-vidispine opened 6 years ago

gustav-vidispine commented 6 years ago

Tried upgrading from 2.2.7 to latest but when building my Vue-library I get tons of error-messages in style with:

⏳  Bundling 5 files: src/List/ListRow.vue.0.vue.component.scss

****/src/List/ListRow.vue.0.vue.component.scss
  143:1  error  Parsing error: Unexpected token

  141 |
  142 |
> 143 | .vdt-list-row{
      | ^
  144 |   display: grid;
  145 |   grid-template-columns: 9em auto;
  146 |   grid-auto-rows: auto;

I'm simply using

<style lang="scss" scoped>
  .vdt-list-row{
    display: grid;
    grid-template-columns: 9em auto;
    grid-auto-rows: auto;
   ...
</style>

Tracked it down to the release 3.0.7 (in 3.0.6 everything runs fine) :)

egoist commented 6 years ago

hmm seems to work for me

gustav-vidispine commented 6 years ago

Can I do anything to help you debug this properly?

I'm also seeing this in the start now I'm noticing.

🚨 Multiple files are emitting to the same path. Please check if is missing in filename option.

Tried uninstall and installing bili.

egoist commented 6 years ago

A minimal repo would help me track down the error.

gustav-vidispine commented 6 years ago

Here you go https://github.com/gustav-vidispine/bili-error

gustav-vidispine commented 6 years ago

@egoist anything being looked at? Could you reproduce?

VitorLuizC commented 6 years ago

I've fixed it using rollup-plugin-css-only.

const { name } = require('./package.json');
const vue = require('rollup-plugin-vue').default;
const css = require('rollup-plugin-css-only');

module.exports = {
  input: 'src/DataTable.vue',
  filename: name + '[suffix].js',
  banner: true,
  format: ['umd', 'umd-min', 'cjs', 'es'],
  plugins: [
    css({
      output: `dist/${name}.css`
    }),
    vue({
      css: false
    })
  ]
};