TypeError: id.startsWith is not a function after moving code to a custom external plugin #15624
Answered
by
wongjn
chrisvidal
asked this question in
Help
-
after moving my plugin code to an external js file, the compilation throws this TypeError that is not coming from my code const plugin = require('tailwindcss/plugin');
const { extendedFontSizes } = require('./config');
const skillup = plugin(
function({ addBase, addUtilities, addComponents, theme, config }) {
addBase({
"h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3": {
fontWeight: theme("fontWeight.bold"),
},
});
}
);
module.exports = skillup; inside tailwind.config.js const skillupPlugin = require('./tailwind/skillup');
module.exports = {
darkMode: false,
...
plugins: [
require("@tailwindcss/typography"),
require("tailwindcss-flip"),
require(skillupPlugin)
],
} package.json:
the full trace is
|
Beta Was this translation helpful? Give feedback.
Answered by
wongjn
Jan 14, 2025
Replies: 1 comment 1 reply
-
It seems like you're trying to require("@tailwindcss/typography"),
require("tailwindcss-flip"),
- require(skillupPlugin)
+ skillupPlugin
],
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
chrisvidal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems like you're trying to
require()
twice where it is not needed: