mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-16 21:39:29 -07:00
Exploring ways to preserve the vanilla JS browser demo without compromising on the bundle. Experimenting with embedding images in the bundle as data URIs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const webpack = require("webpack");
|
||||
const path = require("path");
|
||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
@@ -12,19 +13,14 @@ module.exports = {
|
||||
exclude: /node_modules/,
|
||||
use: ["babel-loader"],
|
||||
},
|
||||
// {
|
||||
// test: /\.css$/,
|
||||
// use: ["style-loader", "css-loader"],
|
||||
// },
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ["style-loader", "css-loader"],
|
||||
},
|
||||
{
|
||||
test: /\.(png|j?g|svg|gif)?$/,
|
||||
test: /\.(png|jpe?g|svg|glsl|wgsl)?$/,
|
||||
type: "asset/resource",
|
||||
},
|
||||
{
|
||||
test: /\.(glsl|frag|vert|wgsl)$/i,
|
||||
exclude: /node_modules/,
|
||||
use: ["raw-loader"],
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
@@ -41,6 +37,12 @@ module.exports = {
|
||||
template: path.resolve(__dirname, "public/index.html"),
|
||||
filename: "index.html",
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{ from: "assets", to: "assets" },
|
||||
{ from: "shaders", to: "shaders" },
|
||||
],
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
],
|
||||
devServer: {
|
||||
|
||||
Reference in New Issue
Block a user