vue-styleguidist / vue-cli-plugin-styleguidist

vue cli 3.0 plugin for vue-styleguidist
MIT License
21 stars 6 forks source link

Custom block <docs></docs> not working when developing #15

Closed rjoo closed 5 years ago

rjoo commented 6 years ago

In a fresh Vue CLI 3 project, I ran vue add styleguidist, it installs everything correctly and styleguidist runs great. But during development with npm run serve, I get a Module parse failed: Unexpected token compile error for anything within the custom <docs> block in a Vue component file.

Before digging into webpack and vue-loader and setting a loader around <docs>, I was hoping this would be more out of the box (since it installs with an example AppButon.vue with <docs>) and I'm just missing a simple setting.

elevatebart commented 6 years ago

As a temporary workaround you can use the following loader in your vue.config.js

 configureWebpack: {
   module: {
      rules: [
        {
          resourceQuery: /blockType=docs/,
          loader: "null-loader"
        }
      ]
    }
  }

I must add that you need to add a null loader to your dependencies

elevatebart commented 6 years ago

fixed in 0.1.6 ;)

elevatebart commented 5 years ago

I believe this is fixed. Closing.