Skip to content

Commit

Permalink
chore(examples): fix the indentation used in webpack-minimal
Browse files Browse the repository at this point in the history
  • Loading branch information
charpeni committed Mar 4, 2025
1 parent 50b5224 commit 4307305
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions examples/webpack-minimal/webpack.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { resolve } from 'path';
import { Configuration } from 'webpack';
import { RsdoctorWebpackPlugin } from '@rsdoctor/webpack-plugin';
import svgToMiniDataURI from "mini-svg-data-uri";
import svgToMiniDataURI from 'mini-svg-data-uri';

const data: Configuration = {
entry: './src/index.ts',
Expand All @@ -13,29 +13,29 @@ const data: Configuration = {
loader: 'ts-loader',
},
{
test: /\.css$/,
loader: "css-loader"
},
test: /\.css$/,
loader: 'css-loader',
},
{
test: /\.(png|jpg)$/,
type: 'asset',
},
{
test: /\.(png|jpg)$/,
type: "asset"
},
{
test: /\.svg$/,
type: "asset",
generator: {
dataUrl: (content: any) => {
if (typeof content !== "string") {
content = content.toString();
}
test: /\.svg$/,
type: 'asset',
generator: {
dataUrl: (content: any) => {
if (typeof content !== 'string') {
content = content.toString();
}

return svgToMiniDataURI(content);
}
}
}
return svgToMiniDataURI(content);
},
},
},
],
},

resolve: {
mainFields: ['browser', 'module', 'main'],
extensions: ['.ts', '.js', '.json', '.wasm'],
Expand All @@ -62,7 +62,12 @@ const data: Configuration = {
ids: true,
},
devtool: 'source-map',
plugins: [new RsdoctorWebpackPlugin({ disableClientServer: !process.env.ENABLE_CLIENT_SERVER, features: ['bundle', 'plugins', 'loader', 'resolver'] })],
plugins: [
new RsdoctorWebpackPlugin({
disableClientServer: !process.env.ENABLE_CLIENT_SERVER,
features: ['bundle', 'plugins', 'loader', 'resolver'],
}),
],
};

export default data;

0 comments on commit 4307305

Please sign in to comment.