Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions apps/public-docsite-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
"types": "./lib/AppDefinition.d.ts",
"import": "./lib/AppDefinition.js",
"require": "./lib-commonjs/AppDefinition.js"
},
"./dist/api": "./dist/api",
"./dist/api/references": "./dist/api/references"
}
},
"sideEffects": [
"*.global.*",
Expand Down
7 changes: 7 additions & 0 deletions apps/public-docsite/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ module.exports = function (env, argv) {
resolve: {
alias: {
...getResolveAlias(true /*useLib*/),
// public-docsite-resources exposes api reference JSON under dist/api that is consumed via
// require.context; its package exports field cannot map a directory, so alias to the real
// directory to resolve it.
'@fluentui/public-docsite-resources/dist/api': path.resolve(
__dirname,
'../public-docsite-resources/dist/api',
),
// react-monaco-editor dynamically loads @types/react via proprietary webpack require.ensure,
// this doesn't work starting @types/react@17.0.48 as the types package introduced Export Maps
'@types/react/index.d.ts': path.resolve(__dirname, '../../node_modules/@types/react/index.d.ts'),
Expand Down
13 changes: 7 additions & 6 deletions apps/public-docsite/webpack.serve.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const IgnoreNotFoundExportWebpackPlugin = require('ignore-not-found-export-webpack-plugin');
const { getResolveAlias, resources } = require('@fluentui/scripts-webpack');
const { addMonacoWebpackConfig } = require('@fluentui/react-monaco-editor/scripts/addMonacoWebpackConfig');
const { getLoadSiteConfig } = require('@fluentui/public-docsite-setup/scripts/getLoadSiteConfig');
Expand Down Expand Up @@ -54,14 +53,16 @@ module.exports = [
removeAvailableModules: false,
},

plugins: [
// This plugin was added to ignore warnings wherever types are imported.
new IgnoreNotFoundExportWebpackPlugin({ include: [/\.tsx?$/] }),
],

resolve: {
alias: {
...getResolveAlias(),
// public-docsite-resources exposes api reference JSON under dist/api that is consumed via
// require.context; its package exports field cannot map a directory, so alias to the real
// directory to resolve it.
'@fluentui/public-docsite-resources/dist/api': path.resolve(
__dirname,
'../public-docsite-resources/dist/api',
),
// react-monaco-editor dynamically loads @types/react via proprietary webpack require.ensure,
// this doesn't work starting @types/react@17.0.48 as the types package introduced Export Maps
'@types/react/index.d.ts': path.resolve(__dirname, '../../node_modules/@types/react/index.d.ts'),
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@
"globals": "13.24.0",
"html-webpack-plugin": "5.6.0",
"husky": "9.1.7",
"ignore-not-found-export-webpack-plugin": "1.0.2",
"imports-loader": "1.2.0",
"jest": "30.2.0",
"jest-axe": "10.0.0",
Expand Down Expand Up @@ -319,7 +318,7 @@
"typescript": "5.7.3",
"typescript-eslint": "8.46.2",
"vite": "6.4.2",
"webpack": "5.99.8",
"webpack": "5.108.4",
"webpack-bundle-analyzer": "4.10.1",
"webpack-cli": "5.1.4",
"webpack-dev-middleware": "7.1.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/webpack/src/storybook-webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const IgnoreNotFoundExportWebpackPlugin = require('ignore-not-found-export-webpack-plugin');
const path = require('path');

const { findGitRoot } = require('@fluentui/scripts-monorepo');

const { getResolveAlias } = require('./getResolveAlias');

/**
Expand Down Expand Up @@ -91,7 +91,7 @@ const createStorybookWebpackConfig = config => {
},
};

config.plugins = [...(config.plugins || []), new IgnoreNotFoundExportWebpackPlugin({ include: [/\.tsx?$/] })];
config.plugins = config.plugins || [];

if (process.env.TF_BUILD) {
// Disable ProgressPlugin in PR/CI builds to reduce log verbosity (warnings and errors are still logged)
Expand Down
3 changes: 1 addition & 2 deletions scripts/webpack/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"types": ["node"]
},
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"include": ["./src/**/*.ts", "./src/**/*.js"],
"files": ["../../typings/ignore-not-found-export-webpack-plugin/index.d.ts"]
"include": ["./src/**/*.ts", "./src/**/*.js"]
}
3 changes: 1 addition & 2 deletions scripts/webpack/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"outDir": "dist",
"types": ["jest", "node"]
},
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"],
"files": ["../../typings/ignore-not-found-export-webpack-plugin/index.d.ts"]
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
}
15 changes: 0 additions & 15 deletions typings/ignore-not-found-export-webpack-plugin/index.d.ts

This file was deleted.

7 changes: 0 additions & 7 deletions typings/ignore-not-found-export-webpack-plugin/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions typings/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
{
"path": "./static-assets/tsconfig.json"
},
{
"path": "./ignore-not-found-export-webpack-plugin/tsconfig.json"
},
{
"path": "./custom-global/tsconfig.json"
},
Expand Down
Loading
Loading