Files
photoshop-ai-edit/webpack.config.js
T
2026-08-03 19:37:45 +08:00

45 lines
1.2 KiB
JavaScript

const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: './src/index.jsx',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js'
},
target: 'web',
devtool: 'eval-cheap-source-map',
resolve: {
extensions: [".js", ".jsx"]
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: "babel-loader",
options: {
plugins: [
"@babel/transform-react-jsx",
"@babel/proposal-object-rest-spread",
"@babel/plugin-syntax-class-properties",
]
}
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader"]
}
]
},
plugins: [
new MiniCssExtractPlugin({ filename: 'styles/panel.css' }),
new CopyPlugin([
'cep'
], {
copyUnmodified: true
})
]
};