diff --git a/src/index.ts b/src/index.ts index ccad1de..77d8145 100644 --- a/src/index.ts +++ b/src/index.ts @@ -133,10 +133,9 @@ const postCSSPlugin = ({ return { resolveDir, - contents: `import "${args.path.replace( - resolveDir, - "." - )}"; export default ${JSON.stringify(mod.map)};` + contents: `import "${args.path}";\nexport default ${JSON.stringify( + mod && mod.map ? mod.map : {} + )};` }; } ); diff --git a/test/styles/test/components/Wallet.module.sass b/test/styles/test/components/Wallet.module.sass new file mode 100644 index 0000000..a6fd6ac --- /dev/null +++ b/test/styles/test/components/Wallet.module.sass @@ -0,0 +1,4 @@ +.Wallet + text-align: left + justify-content: space-around + font-size: 2em \ No newline at end of file