Skip to content

求助,tailwindcss与主题开发相关 #149

Answered by kirazZ1
NeserCode asked this question in Q&A
Discussion options

You must be logged in to vote

这个问题我也有遇到过,是因为传入插件tailwindcss的配置是undefined造成的。
在此项目中对应传入配置的代码如下:

if (app.options.bundler.name === '@vuepress/bundler-vite') {
        const options = defaultViteBundlerConfig()
        const viteBundlerOptions = mergeViteBundlerConfig(options, userConfig)
        // @ts-ignore
        app.options.bundler = viteBundler(viteBundlerOptions)
      } else {
        // @ts-ignore
        app.options.bundler = webpackBundler({
          postcss: {
            postcssOptions: {
              plugins: [
                ['tailwindcss', tailwindcssConfig],
                ['autoprefixer', {}],
                [require('tailwindcss/nesting')],
                ['postcss-each']
              ]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by NeserCode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants