From a6376ee7f506b6e9537e88f60a1514921673c145 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 12:33:14 +0200 Subject: [PATCH] packages/cli: make plugin:serve point to src of deps --- packages/cli/src/commands/plugin/serve.ts | 3 --- packages/cli/src/lib/bundle/config.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/cli/src/commands/plugin/serve.ts b/packages/cli/src/commands/plugin/serve.ts index fb95d5e02b..b06871ce9d 100644 --- a/packages/cli/src/commands/plugin/serve.ts +++ b/packages/cli/src/commands/plugin/serve.ts @@ -15,11 +15,8 @@ */ import { startDevServer } from '../../lib/bundle'; -import { watchDeps } from '../../lib/watchDeps'; export default async () => { - await watchDeps({ build: true }); - await startDevServer(); // Wait for interrupt signal diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index b802712a52..031b1effe3 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -45,6 +45,7 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { ], resolve: { extensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx'], + mainFields: ['main:src', 'browser', 'module', 'main'], plugins: [ new ModuleScopePlugin( [paths.targetSrc, paths.targetDev], @@ -67,7 +68,6 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { }, { test: /\.(tsx?|jsx?|mjs)$/, - include: [paths.targetSrc, paths.targetDev], exclude: /node_modules/, loader: 'ts-loader', options: {