Skip to content

vuepress custom theme and postcss plugins #2155

Open
@francoisromain

Description

@francoisromain
  • [X ] I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

  1. make a custom vuepress theme using postcss plugins and publish it on npm.

The postcss plugins are :

  • in the dependencies of the theme's package.json
  • in the theme's index.js:
module.exports = {
    postcss: {
      plugins: [
        require('postcss-normalize'),
        require('postcss-preset-env')({ stage: 0 })
      ]
    }
  }
  1. import the custom theme in a vuepress project: the theme shows up.

What is expected?

The postcss plugins required by the theme should be processed.

What is actually happening?

The postcss plugins required by the theme are not processed.

Other relevant information

  • Output of npx vuepress info in my VuePress project:
npx vuepress info

Environment Info:

  System:
    OS: macOS High Sierra 10.13.6
    CPU: (8) x64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
  Binaries:
    Node: 13.6.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.13.4 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 72.0.2
    Safari: 13.0.4
  npmPackages:
    @vuepress/core:  1.2.0 
    @vuepress/theme-default:  1.2.0 
    vuepress: ^1.2.0 => 1.2.0 
  npmGlobalPackages:
    vuepress: Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions