ui: ensure build cache

pull/401/head
undefined 2 years ago
parent da09cdbc84
commit 20bbda794e

@ -35,10 +35,9 @@ jobs:
yarn.lock
.cache
**/tsconfig.tsbuildinfo
key: ${{ github.ref }}
key: cache-${{ github.ref }}
restore-keys: |
master
main
cache-
- name: Config And Install
run: |
[[ ! -z "${{secrets.NPM_TOKEN}}" ]] && echo "npmAuthToken: ${{secrets.NPM_TOKEN}}" >> .yarnrc.yml

@ -82,6 +82,9 @@ export default function (env: { production?: boolean, measure?: boolean } = {})
type: 'filesystem',
cacheDirectory: root('../../.cache'),
idleTimeout: 30000,
buildDependencies: {
config: [__filename],
},
},
output: {
path: root('public'),
@ -236,6 +239,9 @@ export default function (env: { production?: boolean, measure?: boolean } = {})
new webpack.DefinePlugin({
'process.env.VERSION': JSON.stringify(require('@hydrooj/ui-default/package.json').version),
}),
new webpack.optimize.MinChunkSizePlugin({
minChunkSize: 128000,
}),
new webpack.NormalModuleReplacementPlugin(/\/(vscode-)?nls\.js/, require.resolve('../../components/monaco/nls')),
new MonacoWebpackPlugin({
filename: '[name].[hash:10].worker.js',

Loading…
Cancel
Save