Fix Blueprintjs CSS has higher priority than UICore in local dev mode (#1233)

This commit is contained in:
Tan Nhu 2024-04-19 07:44:59 +00:00 committed by Harness
parent 83aa52c65e
commit aacc1b88cf
2 changed files with 7 additions and 3 deletions

View File

@ -26,6 +26,7 @@ const HOST = 'localhost'
const PORT = process.env.PORT ?? 3020
const STANDALONE = process.env.STANDALONE === 'true'
const CONTEXT = process.cwd()
const prodConfig = require('./webpack.prod')
console.info(`Starting development build... http://${HOST}:${PORT}`)
console.info('Environment variables:')
@ -33,14 +34,18 @@ console.table({ STANDALONE, HOST, PORT, API_URL })
const devConfig = {
mode: 'development',
context: CONTEXT,
entry: path.resolve(CONTEXT, '/src/index.tsx'),
devtool: 'cheap-module-source-map',
cache: { type: 'filesystem' },
output: {
publicPath: STANDALONE ? '/' : 'auto'
},
optimization: STANDALONE ? { runtimeChunk: 'single' } : {},
optimization: STANDALONE
? {
runtimeChunk: 'single',
splitChunks: prodConfig.optimization.splitChunks
}
: {},
devServer: {
hot: true,
host: HOST,

View File

@ -20,7 +20,6 @@ const CONTEXT = process.cwd()
const path = require('path')
const prodConfig = {
context: CONTEXT,
mode: 'production',
entry: path.resolve(CONTEXT, '/src/index.tsx'),
devtool: process.env.ENABLE_SOURCE_MAP ? 'source-map' : false,