mirror of
https://github.com/aleleba/create-react-component-library.git
synced 2025-06-19 04:18:18 -06:00
PR-489489: Adding baseUrl.
This commit is contained in:
@ -1,9 +1,19 @@
|
||||
const path = require('path');
|
||||
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
||||
const deFaultValues = {
|
||||
PREFIX_URL: ''
|
||||
}
|
||||
const prefixUrl = process.env.PREFIX_URL ? process.env.PREFIX_URL : deFaultValues.PREFIX_URL
|
||||
module.exports = {
|
||||
"stories": ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
||||
"addons": ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions", "@storybook/preset-scss"],
|
||||
"webpackFinal": async config => {
|
||||
config.entry = config.entry.map(function(entry) {
|
||||
if (entry.includes("webpack-hot-middleware")) {
|
||||
return `${require.resolve('webpack-hot-middleware/client')}?path=${prefixUrl}__webpack_hmr&reload=true`;
|
||||
}
|
||||
return entry;
|
||||
}),
|
||||
config.resolve.alias = {
|
||||
...config.resolve.alias,
|
||||
'@components': path.resolve(__dirname, "../src/components/")
|
||||
|
Reference in New Issue
Block a user