@yireo/vsf1-webpack-inheritance-plugin

0.0.6 • Public • Published

Webpack plugin for Vue Storefront 1 theme inheritance

Navigate into your custom theme:

cd src/themes/custom

Install this package:

yarn add @yireo/vsf1-webpack-inheritance-plugin

Add a webpack.config.js:

const Vsf1ThemeInheritancePlugin = require('@yireo/vsf1-webpack-inheritance-plugin');
const themeJson = require('./theme.json');
const path = require("path");

module.exports = function (config, {isClient}) {
  if (!config.resolve.plugins) config.resolve.plugins = [];
  config.resolve.plugins.push(new Vsf1ThemeInheritancePlugin({
    parentPath: path.resolve(__dirname, "..", themeJson.parent);
    childPath: __dirname
  }));
  
  return config;
};

Or merge lines similar to the below to your existing Webpack configuration:

const Vsf1ThemeInheritancePlugin = require('@yireo/vsf1-webpack-inheritance-plugin');
const themeJson = require('./theme.json');
const path = require("path");

if (!config.resolve.plugins) config.resolve.plugins = [];
config.resolve.plugins.push(new Vsf1ThemeInheritancePlugin({
  parentPath: path.resolve(__dirname, "..", themeJson.parent);
  childPath: __dirname
}));
  

Start overriding files. See https://github.com/yireo-training/vsf-yireo-theme for details.

Readme

Keywords

Package Sidebar

Install

npm i @yireo/vsf1-webpack-inheritance-plugin

Weekly Downloads

64

Version

0.0.6

License

ISC

Unpacked Size

3.83 kB

Total Files

3

Last publish

Collaborators

  • jissereitsma