mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 14:03:42 +00:00
fix: add env to EmitPlugin config
This commit is contained in:
parent
72946f920c
commit
4b8910169a
@ -130,7 +130,10 @@ async function build(options){
|
||||
main_array.push(path.join(__dirname, 'src', js_paths[i]));
|
||||
}
|
||||
webpack({
|
||||
...BaseConfig(options),
|
||||
...BaseConfig({
|
||||
...options,
|
||||
env: 'prod',
|
||||
}),
|
||||
mode: 'production',
|
||||
optimization: {
|
||||
minimize: true,
|
||||
|
@ -6,7 +6,7 @@ module.exports = ({ dir, options }) => function () {
|
||||
const compiler = this;
|
||||
compiler.hooks.emit.tapAsync('EmitPlugin', async (compilation, callback) => {
|
||||
let prefix_text = '';
|
||||
prefix_text += 'window.gui_env="dev";\n';
|
||||
prefix_text += `window.gui_env="${options.env}";\n`;
|
||||
|
||||
// -----------------------------------------------
|
||||
// Combine all images into a single js file
|
||||
|
Loading…
Reference in New Issue
Block a user