小编Geo*_*hey的帖子

如何使用Storybook配置VueJS + PostCss + Tailwind

有人成功使用VueJS,PostCss和Tailwind在Storybook中进行组件开发来建立项目吗?

我已经走了这么远:

  1. vue项目(vue-cli 3.0.5
  2. @ storybook / vue(4.0.0-alpha.25)
  3. tailwindcss(0.6.5)
  4. 使用创建组件 <style lang="postcss"> ... </style>
  5. @apply在样式块内使用Tailwind 将实用程序类应用于组件

我遇到的问题是,lang="postcss"运行故事书时,在编译过程中我创建的要使用的故事的任何组件都会失败。

我尝试添加一个自定义webpack配置来停止错误,但我的所有组件均未设置样式。

const path = require('path')

module.exports = {
    module: {
        rules: [
            {
                test: /\.postcss$/,
                loaders: ["style-loader", "css-loader", "postcss-loader"],
                include: path.resolve(__dirname, '../')
            }
        ]
    }
}
Run Code Online (Sandbox Code Playgroud)

我也尝试将我app.postcssstories.js文件(导入顺风)导入文件本身无济于事。任何帮助,将不胜感激。

javascript vue.js storybook vue-cli tailwind-css

10
推荐指数
2
解决办法
859
查看次数

来自Vagrant的节点调试

无法从主机远程调试Chrome中Vagrant框上运行的节点服务器.服务器配置为在端口8123上运行.

节点版本:7.10.0

在Vagrantfile中:

config.vm.network :forwarded_port, host: 9229, guest: 9229
config.vm.network :forwarded_port, host: 8123, guest: 8123
Run Code Online (Sandbox Code Playgroud)

从我的流浪盒我运行:

$ node --inspect index.js
Debugger listening on port 9229.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URL in Chrome:
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/84085f07-dc42-4e1e-bdd8-532e6dc5c4c6
--- Customer Service---
Connecting to customer repository...
Connected. Starting server...
Server started successfully, running on port 8123.
Run Code Online (Sandbox Code Playgroud)

当我尝试从主机访问Chrome中的网址而我没有收到错误时,"来源"标签为空.

devTools的屏幕截图

debugging remote-debugging node.js vagrant

5
推荐指数
1
解决办法
1151
查看次数