Skip to content

Commit

Permalink
Expose sourceFileName to plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcPorciuncula committed Dec 27, 2017
1 parent 940332a commit 3504744
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ The `options` object has the following shape:
vendorPrefixes: boolean,
isGlobal: boolean,
filename: ?string, // defined only when styled-jsx/babel is used via Babel CLI,
sourceFileName: string, // the original Javascript file the CSS block was in
location: { // the original location of the CSS block in the JavaScript file
start: {
line: number,
Expand Down
3 changes: 2 additions & 1 deletion src/_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,8 @@ export const processCss = (stylesInfo, options) => {
vendorPrefixes,
sourceMaps: useSourceMaps,
isGlobal,
filename: fileInfo.filename
filename: fileInfo.filename,
sourceFileName: fileInfo.sourceFileName
}

let transformedCss
Expand Down

0 comments on commit 3504744

Please sign in to comment.