47 lines
1004 B
JavaScript
47 lines
1004 B
JavaScript
const path = require('path');
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const tailwindcss = require('tailwindcss')
|
|
|
|
module.exports = {
|
|
entry: {
|
|
app: './src/app.jsx',
|
|
scene: './src/Scene.js',
|
|
},
|
|
output: {
|
|
filename: '[name].bundle.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
plugins: [new MiniCssExtractPlugin()],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/i,
|
|
use: [
|
|
MiniCssExtractPlugin.loader,
|
|
'css-loader',
|
|
{
|
|
loader: 'postcss-loader',
|
|
options: {
|
|
postcssOptions: {
|
|
plugins: [tailwindcss],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
test: /\.(js|jsx)$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ["@babel/preset-react"],
|
|
}
|
|
}
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.mjs', '.js', '.jsx', '*']
|
|
},
|
|
}; |