Notes tagged with "Vue"
Histoire Setup
Install
npm -i -D histoire @histoire/plugin-vue
histoire.config.js
import { defineConfig } from "histoire"
import { HstVue } from "@histoire/plugin-vue"
export default defineConfig({
plugins: [
HstVue(),
],
setupFile: "/src/histoire.setup.ts"
})
package.json
{
"scripts": {
"story:dev": "histoire dev",
"story:build": "histoire build",
"story:preview": "histoire preview"
}
}
env.d.ts
/// <reference types="@histoire/plugin-vue/components" />
tsconfig.json
Make sure you have a reference to env.d.ts in tsconfig.json.
{
"include": [
"env.d.ts",
"src/**/*",
"src/**/*.vue"
]
}
src/histoire.setup.ts
import "./histoire.css" // import global css