Skip to content

Commit 728dbb8

Browse files
Zackerereplinw
authored and
replinw
committed
fix: Pass absolute module path to serializer registration
1 parent 65af0bb commit 728dbb8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable class-methods-use-this */
22

3+
import path from "path";
34
import { validate } from "schema-utils";
45

56
import schema from "./plugin-options.json";
@@ -205,7 +206,7 @@ class MiniCssExtractPlugin {
205206

206207
webpack.util.serialization.register(
207208
CssModule,
208-
"mini-css-extract-plugin/dist/CssModule",
209+
path.resolve(__dirname, "CssModule"),
209210
null,
210211
{
211212
serialize(instance, context) {
@@ -312,7 +313,7 @@ class MiniCssExtractPlugin {
312313

313314
webpack.util.serialization.register(
314315
CssDependency,
315-
"mini-css-extract-plugin/dist/CssDependency",
316+
path.resolve(__dirname, "CssDependency"),
316317
null,
317318
{
318319
serialize(instance, context) {

0 commit comments

Comments
 (0)