1
Fork 0
solar-conflux/typescript/loopover-leaderboards/preact.config.js
Matei Adriel 37754f1a3f
typescript(loopover-leaderboards): feat: basic landing page
Signed-off-by: prescientmoon <git@moonythm.dev>
2019-12-28 21:40:57 +02:00

26 lines
838 B
JavaScript

import { resolve } from "path";
export default function(config, env, helpers) {
// Switch css-loader for typings-for-css-modules-loader, which is a wrapper
// that automatically generates .d.ts files for loaded CSS
helpers.getLoadersByName(config, "css-loader").forEach(({ loader }) => {
loader.loader = "typings-for-css-modules-loader";
loader.options = Object.assign(loader.options, {
camelCase: true,
banner:
"// This file is automatically generated from your CSS. Any edits will be overwritten.",
namedExport: true,
silent: true
});
});
// Use any `index` file, not just index.js
config.resolve.alias["preact-cli-entrypoint"] = resolve(
process.cwd(),
"src",
"index"
);
return config;
}