Forum Discussion
Joseff
Mar 01, 2024Copper Contributor
ShadCN ui issues using tailwind-merge
Hey guys, I am trying to use the shadcn ui components in my SPFX solution but have hit a wall. There is a util function it uses to merge tailwind that looks like this import { type ClassV...
- Mar 04, 2024Think I worked it out
Setup the config in the gulpfile to:
build.configureWebpack.mergeConfig({
additionalConfiguration: (generatedConfiguration) => {
generatedConfiguration.module.rules.push(
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
},
{
// Match `.js`, `.jsx`, `.ts` or `.tsx` files
test: /\.[jt]sx?$/,
loader: 'esbuild-loader',
options: {
// JavaScript version to compile to
target: 'es2015'
}
},
);
generatedConfiguration.resolve.extensions = ['*', '.mjs', '.js', '.json']
return generatedConfiguration;
}
Tried to use the bable loader but didnt have any luck but this all seems to be working ok
Joseff
Mar 04, 2024Copper Contributor
Think I worked it out
Setup the config in the gulpfile to:
build.configureWebpack.mergeConfig({
additionalConfiguration: (generatedConfiguration) => {
generatedConfiguration.module.rules.push(
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
},
{
// Match `.js`, `.jsx`, `.ts` or `.tsx` files
test: /\.[jt]sx?$/,
loader: 'esbuild-loader',
options: {
// JavaScript version to compile to
target: 'es2015'
}
},
);
generatedConfiguration.resolve.extensions = ['*', '.mjs', '.js', '.json']
return generatedConfiguration;
}
Tried to use the bable loader but didnt have any luck but this all seems to be working ok
Setup the config in the gulpfile to:
build.configureWebpack.mergeConfig({
additionalConfiguration: (generatedConfiguration) => {
generatedConfiguration.module.rules.push(
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
},
{
// Match `.js`, `.jsx`, `.ts` or `.tsx` files
test: /\.[jt]sx?$/,
loader: 'esbuild-loader',
options: {
// JavaScript version to compile to
target: 'es2015'
}
},
);
generatedConfiguration.resolve.extensions = ['*', '.mjs', '.js', '.json']
return generatedConfiguration;
}
Tried to use the bable loader but didnt have any luck but this all seems to be working ok