mirror of https://github.com/webpack/webpack.git
40 lines
693 B
JavaScript
40 lines
693 B
JavaScript
"use strict";
|
|
|
|
const path = require("path");
|
|
const webpack = require("../../");
|
|
|
|
/** @type {import("webpack").Configuration[]} */
|
|
const config = [
|
|
{
|
|
name: "mobile",
|
|
// mode: "development" || "production",
|
|
entry: "./example",
|
|
output: {
|
|
path: path.join(__dirname, "dist"),
|
|
filename: "mobile.js"
|
|
},
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
ENV: JSON.stringify("mobile")
|
|
})
|
|
]
|
|
},
|
|
|
|
{
|
|
name: "desktop",
|
|
// mode: "development" || "production",
|
|
entry: "./example",
|
|
output: {
|
|
path: path.join(__dirname, "dist"),
|
|
filename: "desktop.js"
|
|
},
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
ENV: JSON.stringify("desktop")
|
|
})
|
|
]
|
|
}
|
|
];
|
|
|
|
module.exports = config;
|