mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 07:26:02 +01:00
feat(nui): Initial NUI files
This commit is contained in:
24
web/craco.config.js
Normal file
24
web/craco.config.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const path = require("path");
|
||||
module.exports = {
|
||||
webpack: {
|
||||
configure: (webpackConfig) => {
|
||||
// Because CEF has issues with loading source maps properly atm,
|
||||
// lets use the best we can get in line with `eval-source-map`
|
||||
if (webpackConfig.mode === 'development' && process.env.IN_GAME_DEV) {
|
||||
webpackConfig.devtool = 'eval-source-map'
|
||||
webpackConfig.output.path = path.join(__dirname, 'build')
|
||||
}
|
||||
|
||||
return webpackConfig
|
||||
}
|
||||
},
|
||||
|
||||
devServer: (devServerConfig) => {
|
||||
if (process.env.IN_GAME_DEV) {
|
||||
// Used for in-game dev mode
|
||||
devServerConfig.devMiddleware.writeToDisk = true
|
||||
}
|
||||
|
||||
return devServerConfig
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user