module.exports= { compiler: {// see https://styled-components.dokyumento.jp/docs/tooling#babel-plugin for more info on the options. styledComponents: {// Enabled by default in development, disabled in production to reduce file size,// setting this will override the default for all environments. displayName?: boolean,// Enabled by default. ssr?: boolean,// Enabled by default. fileName?: boolean,// Empty by default. topLevelImportPaths?: string[],// Defaults to ["index"]. meaninglessFileNames?: string[],// Enabled by default. minify?: boolean,// Enabled by default. transpileTemplateLiterals?: boolean,// Empty by default. namespace?: string,// Disabled by default. pure?: boolean,// Enabled by default. cssProp?: boolean, }, },}
constnextJest=require('next/jest')// Providing the path to your Next.js app which will enable loading next.config.js and .env filesconstcreateJestConfig=nextJest({ dir:'./' })// Any custom config you want to pass to JestconstcustomJestConfig= { setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],}// createJestConfig is exported in this way to ensure that next/jest can load the Next.js configuration, which is asyncmodule.exports=createJestConfig(customJestConfig)
module.exports= { compiler: {// The regexes defined here are processed in Rust so the syntax is different from// JavaScript `RegExp`s. See https://docs.rs/regex. reactRemoveProperties: { properties: ['^data-custom$'] }, },}
module.exports= { compiler: { emotion: boolean | {// default is true. It will be disabled when build type is production. sourceMap?: boolean,// default is 'dev-only'. autoLabel?:'never'|'dev-only'|'always',// default is '[local]'.// Allowed values: `[local]` `[filename]` and `[dirname]`// This option only works when autoLabel is set to 'dev-only' or 'always'.// It allows you to define the format of the resulting label.// The format is defined via string where variable parts are enclosed in square brackets [].// For example labelFormat: "my-classname--[local]", where [local] will be replaced with the name of the variable the result is assigned to. labelFormat?: string,// default is undefined.// This option allows you to tell the compiler what imports it should// look at to determine what it should transform so if you re-export// Emotion's exports, you can still use transforms. importMap?: { [packageName: string]: { [exportName: string]: { canonicalImport?: [string, string], styledBaseImport?: [string, string], } } }, }, },}