Allow macaw-ui to be linked (#3539)
This commit is contained in:
parent
5526763c4d
commit
701d96a690
1 changed files with 6 additions and 2 deletions
|
@ -4,7 +4,7 @@ import react from "@vitejs/plugin-react-swc";
|
|||
import { copyFileSync } from "fs";
|
||||
import path from "path";
|
||||
import nodePolyfills from "rollup-plugin-polyfill-node";
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import { defineConfig, loadEnv, searchForWorkspaceRoot } from "vite";
|
||||
import { createHtmlPlugin } from "vite-plugin-html";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
import viteSentry from "vite-plugin-sentry";
|
||||
|
@ -138,6 +138,9 @@ export default defineConfig(({ command, mode }) => {
|
|||
envDir: "..",
|
||||
server: {
|
||||
port: 9000,
|
||||
fs: {
|
||||
allow: [searchForWorkspaceRoot(process.cwd()), "../.."],
|
||||
},
|
||||
},
|
||||
define: {
|
||||
...globals,
|
||||
|
@ -184,7 +187,7 @@ export default defineConfig(({ command, mode }) => {
|
|||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ["esm-dep > cjs-dep"],
|
||||
include: ["esm-dep > cjs-dep", "@saleor/macaw-ui"],
|
||||
esbuildOptions: {
|
||||
plugins: [
|
||||
/*
|
||||
|
@ -196,6 +199,7 @@ export default defineConfig(({ command, mode }) => {
|
|||
},
|
||||
},
|
||||
resolve: {
|
||||
dedupe: ["react", "react-dom", "clsx", "@material-ui/styles"],
|
||||
alias: {
|
||||
"@assets": path.resolve(__dirname, "./assets"),
|
||||
"@locale": path.resolve(__dirname, "./locale"),
|
||||
|
|
Loading…
Reference in a new issue