vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.43k stars 4.78k forks source link

vuepress custom theme and postcss plugins #2155

Open francoisromain opened 4 years ago

francoisromain commented 4 years ago

Bug report

Steps to reproduce

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

The postcss plugins are :

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

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
bencodezen commented 4 years ago

Hey @francoisromain. Thanks for filing this issue! Could you send us the theme you're using so we can try to replicate the issue you're having?

francoisromain commented 4 years ago

Hello @bencodezen here is the theme: https://github.com/francoisromain/vuepress-theme-system