diff --git a/demo/webpack.config.ts b/demo/webpack.config.ts index 8150efb..5abba4d 100644 --- a/demo/webpack.config.ts +++ b/demo/webpack.config.ts @@ -4,6 +4,7 @@ import {CleanWebpackPlugin} from "clean-webpack-plugin"; import HtmlWebpackPlugin from "html-webpack-plugin"; import * as SpriteGenerator from "../plugin/"; +console.log("Using config %s", process.env.NODE_ENV === "development" ? "development" : "production"); export = { entry: path.join(__dirname, "app", "index.tsx"), target: "web", diff --git a/plugin/plugin.ts b/plugin/plugin.ts index bc16e48..a0206d7 100644 --- a/plugin/plugin.ts +++ b/plugin/plugin.ts @@ -53,6 +53,7 @@ class SvgSpriteModule extends Module { constructor(context: string, pluginConfig: Options, configName: string, config: SvgSpriteConfiguration) { super("javascript/dynamic", null); + this.context = context; this.pluginConfig = pluginConfig; this.configName = configName; this.config = config;