mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-14 22:02:36 +00:00
Following https://dev.to/ynwd/how-to-create-react-monorepo-with-npm-workspace-webpack-and-create-react-app-2dhn
26 lines
505 B
JavaScript
26 lines
505 B
JavaScript
// 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
|
|
},
|
|
}
|
|
|