diff --git a/change/@fluentui-make-styles-webpack-loader-94516228-2e64-4dc7-b0eb-4b29e75b8697.json b/change/@fluentui-make-styles-webpack-loader-94516228-2e64-4dc7-b0eb-4b29e75b8697.json new file mode 100644 index 00000000000000..695c011bd26ddf --- /dev/null +++ b/change/@fluentui-make-styles-webpack-loader-94516228-2e64-4dc7-b0eb-4b29e75b8697.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "update tooling configs", + "packageName": "@fluentui/make-styles-webpack-loader", + "email": "olfedias@microsoft.com", + "dependentChangeType": "none" +} diff --git a/packages/make-styles-webpack-loader/.npmignore b/packages/make-styles-webpack-loader/.npmignore index fa2d3a7f5111ca..e719afb921bc93 100644 --- a/packages/make-styles-webpack-loader/.npmignore +++ b/packages/make-styles-webpack-loader/.npmignore @@ -1,4 +1,3 @@ -.cache/ .storybook/ .vscode/ bundle-size/ diff --git a/packages/make-styles-webpack-loader/config/api-extractor.local.json b/packages/make-styles-webpack-loader/config/api-extractor.local.json index c2ea401c1c3685..7974a129e8a337 100644 --- a/packages/make-styles-webpack-loader/config/api-extractor.local.json +++ b/packages/make-styles-webpack-loader/config/api-extractor.local.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "./api-extractor.json", - "mainEntryPointFilePath": "/dist//src/index.d.ts" + "mainEntryPointFilePath": "/dist/packages//src/index.d.ts" } diff --git a/packages/make-styles-webpack-loader/jest.config.js b/packages/make-styles-webpack-loader/jest.config.js index ef5e818fec600b..0e79391bed327a 100644 --- a/packages/make-styles-webpack-loader/jest.config.js +++ b/packages/make-styles-webpack-loader/jest.config.js @@ -8,7 +8,7 @@ module.exports = { preset: '../../jest.preset.js', globals: { 'ts-jest': { - tsConfig: '/tsconfig.json', + tsConfig: '/tsconfig.spec.json', diagnostics: false, }, }, diff --git a/packages/make-styles-webpack-loader/package.json b/packages/make-styles-webpack-loader/package.json index c2b1d5b323180b..1b80cea781d6a1 100644 --- a/packages/make-styles-webpack-loader/package.json +++ b/packages/make-styles-webpack-loader/package.json @@ -17,8 +17,8 @@ "lint": "just-scripts lint", "test": "jest", "docs": "api-extractor run --config=config/api-extractor.local.json --local", - "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/make-styles-webpack-loader/src && yarn docs", - "type-check": "tsc -p ./tsconfig.spec.json" + "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/make-styles-webpack-loader/src && yarn docs", + "type-check": "tsc -b tsconfig.json" }, "devDependencies": { "@fluentui/eslint-plugin": "*", diff --git a/packages/make-styles-webpack-loader/tsconfig.json b/packages/make-styles-webpack-loader/tsconfig.json index f8876269793ebc..8dff38e64b0310 100644 --- a/packages/make-styles-webpack-loader/tsconfig.json +++ b/packages/make-styles-webpack-loader/tsconfig.json @@ -1,17 +1,22 @@ { "extends": "../../tsconfig.base.json", - "include": ["src"], "compilerOptions": { - "target": "ES2015", - "module": "CommonJS", - "lib": ["ES2017", "DOM"], - "outDir": "dist", - "jsx": "react", - "declaration": true, - "experimentalDecorators": true, + "target": "ES2019", + "noEmit": true, + "isolatedModules": true, "importHelpers": true, + "jsx": "react", "noUnusedLocals": true, - "preserveConstEnums": true, - "types": ["jest", "custom-global", "inline-style-expand-shorthand", "node"] - } + "preserveConstEnums": true + }, + "include": [], + "files": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] } diff --git a/packages/make-styles-webpack-loader/tsconfig.lib.json b/packages/make-styles-webpack-loader/tsconfig.lib.json new file mode 100644 index 00000000000000..b54df8cc55e297 --- /dev/null +++ b/packages/make-styles-webpack-loader/tsconfig.lib.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": false, + "lib": ["DOM", "ES2019"], + "outDir": "dist", + "declaration": true, + "types": ["static-assets", "environment", "inline-style-expand-shorthand"], + "module": "CommonJS" + }, + "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"], + "include": ["./src/**/*.ts", "./src/**/*.tsx"] +} diff --git a/packages/make-styles-webpack-loader/tsconfig.spec.json b/packages/make-styles-webpack-loader/tsconfig.spec.json index 9d7ad81faf7168..131e01d2839367 100644 --- a/packages/make-styles-webpack-loader/tsconfig.spec.json +++ b/packages/make-styles-webpack-loader/tsconfig.spec.json @@ -1,7 +1,9 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "noEmit": true + "module": "CommonJS", + "outDir": "dist", + "types": ["jest", "node", "inline-style-expand-shorthand"] }, - "include": ["__fixtures__/**/code.ts"] + "include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts", "__fixtures__/**/code.ts"] }