mirror of
https://github.com/shipshitdev/skills.git
synced 2026-09-19 06:04:15 +08:00
218a3e50d6
Source changes: - Add github project/workflow skills and new skill set (backend: graphql-architect, nestjs-expert, turborepo, typescript-expert/refactor; frontend: react-*, shadcn, tailwind, audit/clarify/critique/layout/polish; security; session-end/start; x-algorithm-optimizer) - Rename reference/ -> references/ in critique, mcp-builder, youtube-video-analyst - Remove obsolete build scripts (generate-bundle, generate-manifest, generate-plugin, sync-marketplace) - Refresh memory/system docs, READMEs, configs (biome, markdownlint, workflows) Generated: - Regenerate all 16 marketplace bundles (186 plugins: 16 bundles + 170 skills) Validated: 170 skills pass skill-sync (Claude + Codex); lint clean (md/code/sh).
69 lines
1.8 KiB
JavaScript
69 lines
1.8 KiB
JavaScript
/**
|
|
* Standard webpack config for Sass with @shipshitdev/ui support
|
|
* Use this in all Next.js apps to configure sass-loader properly
|
|
*/
|
|
|
|
const path = require('node:path');
|
|
|
|
/**
|
|
* Configure webpack for Sass with proper deprecation handling
|
|
*/
|
|
function configureWebpackSass(config, projectRoot) {
|
|
const rules = config.module.rules;
|
|
const scssRule = rules.find(
|
|
(rule) =>
|
|
rule &&
|
|
typeof rule === 'object' &&
|
|
rule !== null &&
|
|
'test' in rule &&
|
|
rule.test &&
|
|
typeof rule.test === 'object' &&
|
|
'toString' in rule.test &&
|
|
rule.test.toString().includes('scss')
|
|
);
|
|
|
|
if (
|
|
scssRule &&
|
|
typeof scssRule === 'object' &&
|
|
scssRule !== null &&
|
|
'oneOf' in scssRule &&
|
|
Array.isArray(scssRule.oneOf)
|
|
) {
|
|
scssRule.oneOf.forEach((oneOf) => {
|
|
if (
|
|
oneOf &&
|
|
typeof oneOf === 'object' &&
|
|
oneOf !== null &&
|
|
'use' in oneOf &&
|
|
Array.isArray(oneOf.use)
|
|
) {
|
|
oneOf.use.forEach((loader) => {
|
|
if (
|
|
loader &&
|
|
typeof loader === 'object' &&
|
|
loader !== null &&
|
|
'loader' in loader &&
|
|
typeof loader.loader === 'string' &&
|
|
loader.loader.includes('sass-loader')
|
|
) {
|
|
const loaderWithOptions = loader;
|
|
loaderWithOptions.options = {
|
|
...loaderWithOptions.options,
|
|
api: 'modern-compiler',
|
|
sassOptions: {
|
|
...loaderWithOptions.options?.sassOptions,
|
|
includePaths: [path.join(projectRoot, 'node_modules')],
|
|
silenceDeprecations: ['legacy-js-api'],
|
|
},
|
|
};
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
return config;
|
|
}
|
|
|
|
module.exports = { configureWebpackSass };
|