Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Lack of documentation for getting started with vue-cli #217

Open
johnhorsema opened this issue Apr 26, 2019 · 3 comments
Open

Lack of documentation for getting started with vue-cli #217

johnhorsema opened this issue Apr 26, 2019 · 3 comments
Assignees
Labels
Projects

Comments

@johnhorsema
Copy link

johnhorsema commented Apr 26, 2019

Describe the bug
Lacks proper documentation for getting started with this library. I had to manually install sass-loader and still run into compilation issues.

To Reproduce
Running webpack development server after installing this library and importing Buttons.vue as component and theme styles in the <style> block.

Expected behavior
A clear and concise Getting Started section.

Solution
Add a Getting Started With Vue-Cli 3.X section to the documentation site.

  1. Install sass-loader
  2. Set vue.config.js as follows
const path = require("path")

module.exports = {
  chainWebpack: config => {
    config.module
      .rule("scss")
      .oneOf("vue-modules")
      .use("sass-loader")
      .tap(args => {
        args.includePaths = ["./node_modules"]
        return args
      })
  },
  css: {
    loaderOptions: {
      sass: {
        includePaths: [path.resolve(__dirname, "node_modules")],
        data: `
          @import "material-components-vue/theme/dist/styles";
        `
      },
    },
  },
}
@johnhorsema johnhorsema changed the title Poor documentation for getting started with vue-cli Lack of documentation for getting started with vue-cli Apr 26, 2019
@tychenjiajun
Copy link
Contributor

@johnhorsema Personally, I use the following

const path = require('path')
const nodeModules = path.resolve('node_modules/')

module.exports = {
  css: {
    loaderOptions: {
      sass: {
        includePaths: [nodeModules]
      }
    }
  }
}

Reference: https://github.com/material-components/material-components-web/blob/master/docs/getting-started.md

I'm also considering creating a vue-cli template.

Pull request is welcomed.

@tychenjiajun
Copy link
Contributor

@tychenjiajun
Copy link
Contributor

@matsp help wanted in all issues related to docs.

@matsp matsp added the docs label Apr 28, 2019
@matsp matsp self-assigned this Apr 28, 2019
@matsp matsp added this to To do in v1.0.0 Apr 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
v1.0.0
  
To do
Development

No branches or pull requests

3 participants