@@ -13,10 +13,9 @@ import * as WebpackDevServer from 'webpack-dev-server';
1313import * as SpeedMeasurePlugin from 'speed-measure-webpack-plugin' ;
1414import * as ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin' ;
1515import { globalState } from './global-state' ;
16- import { tempPath } from './structor-config' ;
16+ import { tempPath , srcPath , packagesPath } from './structor-config' ;
1717import { logInfo } from './log' ;
1818import { getWebpackConfig , IOptions } from './webpack-config' ;
19- import { pri } from '../node' ;
2019
2120const smp = new SpeedMeasurePlugin ( ) ;
2221
@@ -71,12 +70,20 @@ export const runWebpackDevServer = async (opts: IOptions<IExtraOptions>) => {
7170 memoryLimit : 8192 ,
7271 mode : 'write-references' ,
7372 } ,
73+ eslint : {
74+ memoryLimit : 8192 ,
75+ enabled : globalState . sourceConfig . eslintChecker ?. enabled ?? false ,
76+ files : globalState . sourceConfig . eslintChecker ?. files ?? [
77+ `./${ srcPath . dir } /**/*.{ts,tsx}` ,
78+ `./${ packagesPath . dir } /**/*.{ts,tsx}` ,
79+ ] ,
80+ } ,
7481 } ) ,
7582 ) ;
7683 }
7784
7885 const webpackDevServerConfig : WebpackDevServer . Configuration = {
79- host : pri . sourceConfig . host ,
86+ host : globalState . sourceConfig . host ,
8087 hot : opts . hot ,
8188 hotOnly : opts . hot ,
8289 publicPath : opts . publicPath ,
@@ -124,16 +131,16 @@ export const runWebpackDevServer = async (opts: IOptions<IExtraOptions>) => {
124131
125132 const devServer = new WebpackDevServer ( compiler as any , webpackDevServerConfig ) ;
126133
127- devServer . listen ( opts . devServerPort , pri . sourceConfig . host , ( ) => {
134+ devServer . listen ( opts . devServerPort , globalState . sourceConfig . host , ( ) => {
128135 let devUrl : string = null ;
129136 const localSuggestUrl = urlJoin (
130- `${ opts . https || globalState . sourceConfig . useHttps ? 'https' : 'http' } ://${ pri . sourceConfig . host } :${
137+ `${ opts . https || globalState . sourceConfig . useHttps ? 'https' : 'http' } ://${ globalState . sourceConfig . host } :${
131138 opts . devServerPort
132139 } `,
133140 globalState . sourceConfig . baseHref ,
134141 ) ;
135142
136- if ( opts . devUrl === pri . sourceConfig . host ) {
143+ if ( opts . devUrl === globalState . sourceConfig . host ) {
137144 devUrl = localSuggestUrl ;
138145 } else if ( opts . devUrl !== undefined ) {
139146 ( { devUrl } = opts ) ;
0 commit comments