Skip to content

Commit

Permalink
fix: webpack loader ERR_STRING_TOO_LONG fix muxinc#107
Browse files Browse the repository at this point in the history
Error: Cannot create a string longer than 0x1fffffe8 characters
  • Loading branch information
luwes committed Nov 13, 2023
1 parent a2c26ce commit 314747d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/webpack-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import path from 'node:path';
import { readFile, writeFile } from 'node:fs/promises';
import { env } from 'node:process';

export default async function loader(this: any, source: any) {
// https://webpack.js.org/api/loaders#raw-loader
export const raw = true;

export default async function loader(this: any, source: Buffer) {
const assetPath = path.resolve(getAssetConfigPath(this.resourcePath));

this.addDependency(assetPath);
Expand Down

0 comments on commit 314747d

Please sign in to comment.