1.0.2 • Published 2 months ago

vue-cli-plugin-inject-style v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

vue-cli-plugin-inject-style

automatically inject style files based on the style path

Install

with pnpm

pnpm add vue-cli-plugin-inject-style -D

with yarn

yarn add vue-cli-plugin-inject-style -D

with npm

npm install vue-cli-plugin-inject-style -D

with vue

vue add vue-cli-plugin-inject-style

Option

export type InjectStyle = {
    /**
     * @description style root
     * @default src/style
     */
    path: string;

    /**
     * @description style suffix
     * @default ["scss","less"]
     */
    suffixs: suffix[];
};

Config

// vue.config.js
const path = require('path');
const { defineConfig } = require('@vue/cli-service');
module.exports = defineConfig({
    transpileDependencies: true,
    css: {
        sourceMap: false,
        loaderOptions: {
            // manual add
            scss: {
                additionalData: '@import "~@/styles/index.scss";'
            }
        }
    },
    pluginOptions: {
        'vue-cli-plugin-inject-style': {
            path: path.join(__dirname, 'src', 'style'),
            suffixs: ['scss', 'less']
        }
    }
});
1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

3 months ago

0.0.8

3 months ago

0.0.7

3 months ago

0.0.6

3 months ago

0.0.5

6 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.4

8 months ago

0.0.1

1 year ago