Skip to content

Commit e63e539

Browse files
committed
fix: #57 named export 'withOptions' was not found in tailwind/plugin.js, replaced with default import
1 parent e65564f commit e63e539

7 files changed

+20
-8
lines changed

dist/plugin.cjs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
var plugin_js = require('tailwindcss/plugin.js');
1+
var TailwindPlugin = require('tailwindcss/plugin.js');
22
var postcss = require('postcss');
33
var fs = require('fs');
44

55
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
66

7+
var TailwindPlugin__default = /*#__PURE__*/_interopDefaultLegacy(TailwindPlugin);
78
var postcss__default = /*#__PURE__*/_interopDefaultLegacy(postcss);
89

910
const optionsHandlerForIgnoreAndRemove = (selector, {
@@ -103,6 +104,9 @@ const isolateForComponents = (componentSelectors, options) => {
103104
};
104105
};
105106

107+
const {
108+
withOptions
109+
} = TailwindPlugin__default["default"];
106110
/**
107111
* TailwindCSS plugin to scope the preflight styles
108112
* @param isolationStrategy - function to transform the preflight CSS selectors,
@@ -113,7 +117,7 @@ const isolateForComponents = (componentSelectors, options) => {
113117
* @param modifyPreflightStyles - function to modify the preflight CSS properties and their values, return null to remove the property. Any other returned value will be used as a new value for the property. If you don't want to change it - return the old value (provided in argument object as `value`).
114118
* @link https://www.npmjs.com/package/tailwindcss-scoped-preflight (documentation)
115119
*/
116-
const scopedPreflightStyles = plugin_js.withOptions(({
120+
const scopedPreflightStyles = withOptions(({
117121
isolationStrategy,
118122
propsFilter,
119123
modifyPreflightStyles

dist/plugin.cjs.map

+1-1
Large diffs are not rendered by default.

dist/plugin.esm.js

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugin.esm.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugin.modern.mjs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { withOptions } from 'tailwindcss/plugin.js';
1+
import TailwindPlugin from 'tailwindcss/plugin.js';
22
import postcss from 'postcss';
33
import { readFileSync } from 'fs';
44

@@ -99,6 +99,9 @@ const isolateForComponents = (componentSelectors, options) => {
9999
};
100100
};
101101

102+
const {
103+
withOptions
104+
} = TailwindPlugin;
102105
/**
103106
* TailwindCSS plugin to scope the preflight styles
104107
* @param isolationStrategy - function to transform the preflight CSS selectors,

dist/plugin.modern.mjs.map

+1-1
Large diffs are not rendered by default.

src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { withOptions } from 'tailwindcss/plugin.js';
1+
import TailwindPlugin from 'tailwindcss/plugin.js';
22
import postcss from 'postcss';
33
import { type CSSRuleObject } from 'tailwindcss/types/config.js';
44
import { readFileSync } from 'fs';
55

6+
const { withOptions } = TailwindPlugin;
7+
68
interface PropsFilterInput {
79
selectorSet: Set<string>;
810
property: string;

0 commit comments

Comments
 (0)