npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-separate-webpack-plugin

v1.1.1

Published

Build virtual SFCs for Vue.js and webpack

Downloads

10

Readme

vue-separate-webpack-plugin

Are you a Vue.js fan? Do you believe in separation of concerns AND files? Do you use webpack? You probably need this plugin… 😎

stability-wip npm version Commitizen friendly Conventional Commits License CircleCI Coverage Status

Description

vue-separate-webpack-plugin is a webpack resolver plugin that allows you to write Vue.js components into separate files while using vue-loader, HRM and without creating any physical or temporary .vue file.

Install

npm i -D vue-separate-webpack-plugin

or

yarn add -D vue-separate-webpack-plugin

Getting started

// webpack.config.js

const { VueSeparatePlugin } = require('vue-separate-webpack-plugin')

module.exports = {
  resolve: {
    plugins: [new VueSeparatePlugin()]
  }
}

With @vue/cli

// vue.config.js

const { VueSeparatePlugin } = require('./dev/plugin')

module.exports = {
  chainWebpack: config => {
    // prettier-ignore
    config
      .resolve
      .plugin('vue-separate-webpack-plugin')
      .use(VueSeparatePlugin)
  }
}

Option

Passed as regular Object.

| Property | Type | Default | Description | | -------- | -------- | ------- | ------------------------------------------------- | | root | string | 'src' | Root/src folder where your components are located |

How it works

Simply create your separated files side by side:

  • Component.vue.html (pug|jade)
  • Component.vue.css (scss|sass|less|styl|stylus)
  • Component.vue.js (ts|coffee)

Then, import your component:

import Component from 'Component.vue'

That's it!

Scoped CSS

Component.vue.scoped.css (scss|sass|less|styl|stylus)

Works alongside with Component.vue.css

Functional components

Component.vue.functional.html (pug|jade)

Custom blocks

Component.vue.custom


Inspiration

Inspired by vuemaker-webpack-plugin and vue-separate-files-webpack-loader Thanks to webpack-virtual-modules

How to contribute

If you want to report a bug or if you just want to request for a new feature/improvement, please follow those instructions before.

Thanks for taking time to contribute to vue-separate-webpack-plugin :+1: