Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: fix package paths",
"packageName": "@fluentui/web-components",
"email": "miroslav.stastny@microsoft.com",
"dependentChangeType": "none"
}
7 changes: 7 additions & 0 deletions packages/web-components/.storybook/main.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const CircularDependencyPlugin = require('circular-dependency-plugin');
const path = require('path');
const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');

const tsBin = require.resolve('typescript');

Expand All @@ -24,6 +26,11 @@ module.exports = /** @type {Omit<import('../../../.storybook/main').StorybookCon
},
],
webpackFinal: async config => {
const tsPaths = new TsconfigPathsPlugin({
configFile: path.resolve(__dirname, '../tsconfig.json'),
});
config.resolve.plugins ? config.resolve.plugins.push(tsPaths) : (config.resolve.plugins = [tsPaths]);

config.resolve.extensionAlias = {
'.js': ['.ts', '.js'],
'.mjs': ['.mts', '.mjs'],
Expand Down
6 changes: 5 additions & 1 deletion packages/web-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
"skipLibCheck": true,
"importHelpers": true,
"types": ["node", "mocha", "webpack-env"],
"lib": ["DOM", "ES2015", "ES2016.Array.Include"]
"lib": ["DOM", "ES2015", "ES2016.Array.Include"],
"baseUrl": "../..",
"paths": {
"@fluentui/tokens": ["packages/tokens/src/index.ts"]
}
},
"include": ["src"]
}