Added server build mode for webpack
This commit is contained in:
@@ -1,18 +1,22 @@
|
|||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
|
||||||
|
cache:
|
||||||
|
key: ${CI_COMMIT_REF_SLUG}
|
||||||
|
paths:
|
||||||
|
- ReallifeGamemode.Client/node_modules/
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- "dotnet restore"
|
|
||||||
- "git lfs install"
|
- "git lfs install"
|
||||||
- "git lfs pull"
|
- "git lfs pull"
|
||||||
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: clone
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
- develop@log-gtav/reallife-gamemode
|
- develop@log-gtav/reallife-gamemode
|
||||||
script:
|
script:
|
||||||
- "../gm_database_password.sh"
|
- "../gm_database_password.sh"
|
||||||
- "dotnet build -c ServerBuild"
|
- "dotnet build -c ServerBuild"
|
||||||
|
- "cd ReallifeGamemode.Client/"
|
||||||
|
- "yarn install"
|
||||||
|
- "yarn run build:server"
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
"webpack-cli": "^3.2.3"
|
"webpack-cli": "^3.2.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"run": "webpack --watch"
|
"watch": "webpack --watch --config webpack.config.development.js",
|
||||||
|
"build:server": "webpack --config webpack.config.build.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
30
ReallifeGamemode.Client/webpack.config.build.js
Normal file
30
ReallifeGamemode.Client/webpack.config.build.js
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
mode: 'production',
|
||||||
|
entry: './index.ts',
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname),
|
||||||
|
filename: 'index.js'
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
use: { loader: 'babel-loader' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.ts$/,
|
||||||
|
use: {
|
||||||
|
loader: 'ts-loader',
|
||||||
|
options: {
|
||||||
|
allowTsInNodeModules: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: ['.ts', '.js', '.json']
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
const CopyPlugin = require('copy-webpack-plugin');
|
const CopyPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: 'production',
|
mode: 'development',
|
||||||
entry: './index.ts',
|
entry: './index.ts',
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, '..', '..', 'client_packages'),
|
path: path.resolve(__dirname, '..', '..', 'client_packages'),
|
||||||
Reference in New Issue
Block a user