Skip to content

Instantly share code, notes, and snippets.

const path = require('path');
const { VueLoaderPlugin } = require('vue-loader');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { ModuleFederationPlugin } = require('webpack').container;
module.exports = (env = {}) => ({
mode: 'development',
cache: false,
devtool: 'source-map',
optimization: {
<template>
<div class="home-container">
<h4 class="home-header">Top Header Home App</h4>
</div>
</template>
<script>
</script>
<style>
import { createApp, defineAsyncComponent } from "vue";
import App from "./App.vue";
const Main = defineAsyncComponent(() => import('home/main'));
const app = createApp(App)
app.component('header-element',Main)
app.mount("#app");
const path = require('path');
const { VueLoaderPlugin } = require('vue-loader');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { ModuleFederationPlugin } = require('webpack').container;
module.exports = (env = {}) => ({
mode: 'development',
cache: false,
devtool: 'source-map',
optimization: {
{
"private": true,
"workspaces": ["container", "home"]
}