-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Prevent Angular FOUC because bundle may be included with defer. * Add fake startup * Don't downgrade Node, use latest.
- Loading branch information
1 parent
24c9417
commit bc3d210
Showing
8 changed files
with
159 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,11 +135,6 @@ jobs: | |
- name: Checkout ${{ github.ref }} branch in ${{ github.repository }} repository. | ||
uses: actions/checkout@v2 | ||
|
||
- name: Downgrade node from v14.17.6/6.14.15 to v8.17.0/6.13.4. | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '8' | ||
|
||
# Set the time zone, otherwise 5 Performances display > shows performances tests fail | ||
# > - Expected By(css selector, .performance) to have text 12:00 but was 11:00 | ||
- uses: szenius/[email protected] | ||
|
@@ -177,12 +172,12 @@ jobs: | |
working-directory: Heroku | ||
run: | | ||
npm run test | ||
cd frontend && npm run build-prod | ||
cd frontend && npm run build:prod | ||
# Pre-build artifacts for more immediate and deterministic startup. | ||
- name: Build Frontend | ||
working-directory: Heroku/frontend | ||
run: npm run build-dev | ||
run: npm run build:dev | ||
|
||
- name: Build Sync & Backend | ||
working-directory: Heroku | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
'use strict'; | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); // https://github.com/jantimon/html-webpack-plugin#options | ||
const CopyWebpackPlugin = require('copy-webpack-plugin'); // https://github.com/webpack-contrib/copy-webpack-plugin | ||
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); // https://github.com/webpack-contrib/mini-css-extract-plugin | ||
const path = require('path'); | ||
|
||
module.exports = (env, argv) => { | ||
const dist = path.resolve(__dirname, '..', 'deploy'); | ||
console.log(`Running in mode: ${argv.mode}; deploying to ${dist}.`); | ||
const devMode = argv.mode === 'development'; | ||
return { | ||
entry: { | ||
'planner/index': './src/planner/scripts/index.js', | ||
}, | ||
output: { | ||
path: path.join(dist, 'static'), | ||
// don't set publicPath to an absolute path because it emits a <script> with that prefix | ||
//publicPath: dist, | ||
filename: '[name].bundle.js' | ||
}, | ||
devtool: devMode | ||
? 'inline-source-map' | ||
: undefined, | ||
plugins: [ | ||
new MiniCssExtractPlugin(), | ||
new CopyWebpackPlugin({ | ||
patterns: [ | ||
{ from: 'src/old', to: 'planner-old' }, | ||
], | ||
}), | ||
new HtmlWebpackPlugin({ | ||
template: 'src/main/pages/index.html', | ||
filename: 'index.html', | ||
chunks: [], | ||
}), | ||
new HtmlWebpackPlugin({ | ||
template: 'src/planner/pages/index.html', | ||
filename: 'planner/index.html', | ||
chunks: ['planner/index'], | ||
}), | ||
], | ||
module: { | ||
// https://webpack.js.org/guides/migrating/#chaining-loaders | ||
rules: [ | ||
{ | ||
test: /\.(html)$/, | ||
// These templates/.html files are loaded into the $templateCache raw/as is. | ||
include: [path.join(__dirname, 'src/planner/templates/')], | ||
// When loaded with require() only asset/source gives contents. | ||
// asset/resource gives url and asset/inline gives encoded data URI. | ||
type: 'asset/source', | ||
}, | ||
{ | ||
test: /\.(css)$/, | ||
use: [ | ||
{ | ||
loader: MiniCssExtractPlugin.loader, | ||
}, | ||
{ | ||
loader: 'css-loader', | ||
}, | ||
], | ||
}, | ||
{ | ||
test: /\.(sass|scss)/, | ||
use: [ | ||
{ | ||
loader: MiniCssExtractPlugin.loader, | ||
}, | ||
{ | ||
loader: 'css-loader', | ||
}, | ||
{ | ||
loader: 'sass-loader', | ||
options: { | ||
sassOptions: { | ||
outputStyle: 'expanded', | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif)$/, | ||
type: 'asset/resource', | ||
generator: { | ||
filename: 'images/[name]-[hash][ext][query]', | ||
}, | ||
}, | ||
{ | ||
test: /\.(svg|eot|ttf|woff|woff2)$/, | ||
type: 'asset/resource', | ||
generator: { | ||
filename: 'fonts/[name]-[hash][ext][query]', | ||
}, | ||
}, | ||
], | ||
}, | ||
}; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters