Skip to content

Commit

Permalink
Update gulpfile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
cavencj authored May 10, 2023
1 parent fe6e834 commit 1407e58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, //压缩代码
Expand Down Expand Up @@ -158,6 +160,7 @@ async function buildModules(options) {
...buildConfig,
format: 'iife',
globalName: 'DC',
plugins: [inlineImage({limit: -1 }),glsl()],
outfile: path.join('dist', 'modules.js'),
})
}
Expand All @@ -183,6 +186,7 @@ async function buildModules(options) {
define: {
TransformStream: 'null',
},
plugins: [inlineImage({limit: -1 }),glsl()],
outfile: path.join('dist', 'modules.cjs'),
})
}
Expand Down

0 comments on commit 1407e58

Please sign in to comment.