Skip to content

Commit

Permalink
enable customAtRules to be given in options
Browse files Browse the repository at this point in the history
  • Loading branch information
mpech committed Nov 23, 2023
1 parent 39a134e commit 3e7f0a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const { dirname, join } = require("path");
* @param {import("lightningcss").TransformOptions["visitor"]=} options.visitor
* @param {import("lightningcss").TransformOptions["targets"]=} options.targets
* @param {import("lightningcss").TransformOptions["drafts"]=} options.drafts
* @param {import("lightningcss").TransformOptions["customAtRules"]=} options.customAtRules
* @param {import("lightningcss").CSSModulesConfig["pattern"]=} options.cssModulesPattern
* @param {import("lightningcss").CSSModulesConfig=} options.cssModules
* @return {import("esbuild").Plugin}
Expand Down Expand Up @@ -57,6 +58,7 @@ const cssModules = (options = {}) => {
targets: options.targets,
drafts: options.drafts,
visitor: options.visitor,
customAtRules: options.customAtRules,
// this way the correct relative path for the source map will be generated ;)
projectRoot: join(initialOptions.absWorkingDir || process.cwd(), initialOptions.outdir)
});
Expand Down

0 comments on commit 3e7f0a1

Please sign in to comment.