diff --git a/content/en/utoopack/index.mdx b/content/en/utoopack/index.mdx index ac66317..44bb7b9 100644 --- a/content/en/utoopack/index.mdx +++ b/content/en/utoopack/index.mdx @@ -32,20 +32,23 @@ const { build } = require('@utoo/pack'); async function runBuild() { await build({ - mode: "production", - entry: [ - { - import: "./src/index.ts", - html: { template: "./index.html" } - } - ], - output: { - path: "./dist", - filename: "[name].[contenthash:8].js", - chunkFilename: "[name].[contenthash:8].js", - clean: true - }, - sourceMaps: true + config: { + entry: [ + { + import: "./src/index.ts", + html: { + template: "./index.html" + } + } + ], + output: { + path: "./dist", + filename: "[name].[contenthash:8].js", + chunkFilename: "[name].[contenthash:8].js", + clean: true + }, + sourceMaps: true + } }); } @@ -58,20 +61,23 @@ const { dev } = require('@utoo/pack'); async function startDev() { const server = await dev({ - mode: "development", - entry: [ - { - import: "./src/index.ts", - html: { template: "./index.html" } - } - ], - output: { - path: "./dist", - filename: "[name].[contenthash:8].js", - chunkFilename: "[name].[contenthash:8].js", - clean: true - }, - sourceMaps: true + config: { + entry: [ + { + import: "./src/index.ts", + html: { + template: "./index.html" + } + } + ], + output: { + path: "./dist", + filename: "[name].[contenthash:8].js", + chunkFilename: "[name].[contenthash:8].js", + clean: true + }, + sourceMaps: true + } }); } diff --git a/content/zh/utoopack/index.mdx b/content/zh/utoopack/index.mdx index 65b0bf2..0789c3f 100644 --- a/content/zh/utoopack/index.mdx +++ b/content/zh/utoopack/index.mdx @@ -32,20 +32,23 @@ const { build } = require('@utoo/pack'); async function runBuild() { await build({ - mode: "production", - entry: [ - { - import: "./src/index.ts", - html: { template: "./index.html" } - } - ], - output: { - path: "./dist", - filename: "[name].[contenthash:8].js", - chunkFilename: "[name].[contenthash:8].js", - clean: true - }, - sourceMaps: true + config: { + entry: [ + { + import: "./src/index.ts", + html: { + template: "./index.html" + } + } + ], + output: { + path: "./dist", + filename: "[name].[contenthash:8].js", + chunkFilename: "[name].[contenthash:8].js", + clean: true + }, + sourceMaps: true + } }); } @@ -58,20 +61,23 @@ const { dev } = require('@utoo/pack'); async function startDev() { const server = await dev({ - mode: "development", - entry: [ - { - import: "./src/index.ts", - html: { template: "./index.html" } - } - ], - output: { - path: "./dist", - filename: "[name].[contenthash:8].js", - chunkFilename: "[name].[contenthash:8].js", - clean: true - }, - sourceMaps: true + config: { + entry: [ + { + import: "./src/index.ts", + html: { + template: "./index.html" + } + } + ], + output: { + path: "./dist", + filename: "[name].[contenthash:8].js", + chunkFilename: "[name].[contenthash:8].js", + clean: true + }, + sourceMaps: true + } }); }