Here is my bundle file, i have included components here.
import Container from './Components/Container/Container.component.js'; import Heading from './Components/Heading/Heading.component.js'; const Components = { Container: Container, Heading: Heading } module.exports = Components; the goal is to make this Components variable visible in the browser tag. so far console.log(Components) is undefined.
module.exports = { entry: { bundle: "./src/bundle.js" }, output: { path: path.resolve(__dirname, "dist/js"), filename: "bundle.js", library: "Components", libraryTarget: "var", }, module:{ rules: [ { test: /\.js$/, exclude: path.resolve(__dirname, "node_modules"), use: { loader: "babel-loader", options: { presets: ["env", "react"] } } } ] }, target: "web" } And this is my webpack config file. what do i do inside my webpack config to make Components to be visible in browser without assigning it to window object. in other words, make it global and beign able to import it via webpack into other js files.
<Components.Container>and<Components.Heading>being rendered?ReactDOM.render()