| import { babel } from '@rollup/plugin-babel' | import { babel } from '@rollup/plugin-babel' | ||||
| import startServer from './server.js' | import startServer from './server.js' | ||||
| import { uglify } from 'rollup-plugin-uglify' | import { uglify } from 'rollup-plugin-uglify' | ||||
| import inlineImage from 'esbuild-plugin-inline-image' | |||||
| import { glsl } from "esbuild-plugin-glsl"; | |||||
| const obfuscatorConfig = { | const obfuscatorConfig = { | ||||
| compact: true, //压缩代码 | compact: true, //压缩代码 | ||||
| ...buildConfig, | ...buildConfig, | ||||
| format: 'iife', | format: 'iife', | ||||
| globalName: 'DC', | globalName: 'DC', | ||||
| plugins: [inlineImage({limit: -1 }),glsl()], | |||||
| outfile: path.join('dist', 'modules.js'), | outfile: path.join('dist', 'modules.js'), | ||||
| }) | }) | ||||
| } | } | ||||
| define: { | define: { | ||||
| TransformStream: 'null', | TransformStream: 'null', | ||||
| }, | }, | ||||
| plugins: [inlineImage({limit: -1 }),glsl()], | |||||
| outfile: path.join('dist', 'modules.cjs'), | outfile: path.join('dist', 'modules.cjs'), | ||||
| }) | }) | ||||
| } | } |