Brandon Thomas committed 2022-01-31 23:12:31 -05:00
1 parent a21568d918
commit dbbf2566c8
5 files changed
+2711

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
// babel.config.js
module.exports = {
presets: [
[
"@babel/preset-react",
{
targets: {
node: "current",
},
},
],
],
};
+2635
View File
File diff suppressed because it is too large. Load diff
+24
View File
@@ -0,0 +1,24 @@
{
"name": "components",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.16.12",
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"babel-loader": "^8.2.3",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2"
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
+13
View File
@@ -0,0 +1,13 @@
// src/index.js
import React from "react"
const Header = ({ text = "" }) => {
return (
<h1>Shared header library {text}</h1>
)
}
export {
Header
}
+25
View File
@@ -0,0 +1,25 @@
// webpack.config.js
const path = require("path")
module.exports = {
mode: "production",
entry: {
index: { import: "./src/index.js" }
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: "babel-loader",
},
],
},
output: {
filename: "components.bundle.min.js",
library: 'fstrComponents',
libraryTarget: 'umd',
clean: true
},
}