feat(cli): build package style entry

This commit is contained in:
陈嘉涵
2019-11-29 11:37:48 +08:00
parent 964b2cf3bf
commit 19a1ab37ef
11 changed files with 66 additions and 27 deletions

View File

@@ -2,11 +2,12 @@ import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import { getPort } from 'portfinder';
import { clean } from '../commands/clean';
import { buildESModuleOutputs } from './build';
import { siteDevConfig } from '../config/webpack.site.dev';
import { genPackageEntry } from '../compiler/gen-package-entry';
import { genMobileEntry } from '../compiler/gen-mobile-entry';
import { genDesktopEntry } from '../compiler/gen-desktop-entry';
import { genStyleDepsMap } from '../compiler/gen-style-deps-map';
import { genDepsMap } from '../compiler/gen-style-deps-map';
function runWebpack() {
const server = new WebpackDevServer(
@@ -33,9 +34,10 @@ function runWebpack() {
);
}
export function dev() {
clean();
genStyleDepsMap();
export async function dev() {
await clean();
await buildESModuleOutputs();
genDepsMap();
genPackageEntry();
genMobileEntry();
genDesktopEntry();