From 1407e58385c3c2175d74221642a52f72a16c8041 Mon Sep 17 00:00:00 2001 From: Caven Chen Date: Wed, 10 May 2023 09:48:52 +0800 Subject: [PATCH] Update gulpfile.js --- gulpfile.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index aac7d20c..c00d6287 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,6 +19,8 @@ import javascriptObfuscator from 'gulp-javascript-obfuscator' import { babel } from '@rollup/plugin-babel' import startServer from './server.js' import { uglify } from 'rollup-plugin-uglify' +import inlineImage from 'esbuild-plugin-inline-image' +import { glsl } from "esbuild-plugin-glsl"; const obfuscatorConfig = { compact: true, //压缩代码 @@ -158,6 +160,7 @@ async function buildModules(options) { ...buildConfig, format: 'iife', globalName: 'DC', + plugins: [inlineImage({limit: -1 }),glsl()], outfile: path.join('dist', 'modules.js'), }) } @@ -183,6 +186,7 @@ async function buildModules(options) { define: { TransformStream: 'null', }, + plugins: [inlineImage({limit: -1 }),glsl()], outfile: path.join('dist', 'modules.cjs'), }) }