This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:14.19.3 as build | |
ARG BUILD_CONTEXT | |
WORKDIR /fe | |
COPY package.json . | |
COPY yarn.lock . | |
COPY ./apps/$BUILD_CONTEXT/package.json apps/$BUILD_CONTEXT/ | |
COPY ./apps/lib/package.json apps/lib/ | |
RUN yarn --pure-lockfile --non-interactive --production | |
COPY ./apps/$BUILD_CONTEXT apps/$BUILD_CONTEXT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { logger } = require('./logger'); | |
const fetch = require('node-fetch'); // Ensure you have node-fetch installed | |
/**====================== | |
** URLBUILDER | |
*@param ports array of int | |
*@param path string | |
*@return object | |
*========================**/ | |
class urlBuilder { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node | |
ARG BUILD_CONTEXT | |
WORKDIR /fe | |
# Copy package files and install dependencies | |
COPY package.json . | |
# COPY yarn.lock . | |
COPY .yarnrc.yml . | |
COPY ./apps/$BUILD_CONTEXT/package.json apps/$BUILD_CONTEXT/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { getRemoteURL } = require('lib'); | |
const { ModuleFederationPlugin } = require('webpack').container; | |
const pkg = require('./package.json'); | |
module.exports = { | |
entry: './src/index', | |
mode: 'development', | |
devServer: { | |
port: 58841, | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const https = require('https'); | |
const { getDockerIPV4_URL } = require('./get-container.host'); | |
class urlBuilder { | |
constructor(ports, path, name, git) { | |
this.ports = ports; | |
this.path = path.startsWith('/') ? path : '/' + path; | |
this.hosts = [ | |
'http://localhost', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const { ModuleFederationPlugin } = require('webpack').container; | |
const path = require('path'); | |
const { getRemoteURL } = require('lib'); | |
const { VueLoaderPlugin } = require('vue-loader'); | |
// const pkg = require('./package.json'); | |
module.exports = { | |
entry: "./src/index", | |
mode: "development", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node | |
ARG BUILD_CONTEXT | |
WORKDIR /fe | |
# Copy package files and install dependencies | |
COPY package.json . | |
# COPY yarn.lock . | |
COPY .yarnrc.yml . | |
COPY ./apps/$BUILD_CONTEXT/package.json apps/$BUILD_CONTEXT/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodeLinker: node-modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "react-counter", | |
"version": "0.0.0", | |
"private": true, | |
"repository": { | |
"type": "git", | |
"url": "https://github.com/your-username/your-repository.git" | |
}, | |
"devDependencies": { | |
"@babel/core": "7.24.7", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sullemanhossam@hossams-MacBook-Air ui % yarn start | |
^C[shared-store]: asset remoteEntry.js 282 KiB [emitted] (name: store) | |
[shared-store]: asset main.js 281 KiB [emitted] (name: main) | |
[shared-store]: asset vendors-node_modules_effector_effector_mjs.js 28.1 KiB [emitted] (id hint: vendors) | |
[shared-store]: asset src_counter_js.js 1.59 KiB [emitted] | |
[shared-store]: runtime modules 82.9 KiB 32 modules | |
[shared-store]: built modules 200 KiB (javascript) 42 bytes (share-init) 42 bytes (consume-shared) [built] | |
[shared-store]: modules by path ../../node_modules/ 200 KiB | |
[shared-store]: modules by path ../../node_modules/webpack-dev-server/client/ 71.8 KiB 16 modules | |
[shared-store]: modules by path ../../node_modules/webpack/hot/*.js 5.18 KiB 4 modules |