Skip to content

Commit

Permalink
Safeupdate - Fix CSS (#18)
Browse files Browse the repository at this point in the history
* make it build

* shows date in title

* better date format

* tools update

* paket update

* logging smapi method as debug

* update steps safe2

* npm update

* updated github actions

* removed comments

* default is bundle

* enabled css bundling and added missing dependencies
  • Loading branch information
brase authored Oct 14, 2020
1 parent 6fff243 commit b1b2787
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@babel/runtime": "^7.11.2",
"@fortawesome/fontawesome-free": "^5.10.2",
"open-sans-fonts": "^1.5.1",
"babel-loader": "^8.0.5",
"bulma": "^0.7.1",
"copy-webpack-plugin": "^6.2.1",
"core-js": "^3.3.2",
"css-loader": "^4.3.0",
Expand Down
8 changes: 6 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var CONFIG = {
// See https://github.com/jantimon/html-webpack-plugin
indexHtmlTemplate: './src/Client/index.html',
fsharpEntry: './src/Client/Client.fsproj',
cssEntry: './src/Client/style.scss',
outputDir: './deploy/public',
assetsDir: './src/Client/public',
devServerPort: 8080,
Expand Down Expand Up @@ -68,8 +69,11 @@ module.exports = {
// have a faster HMR support. In production bundle styles together
// with the code because the MiniCssExtractPlugin will extract the
// CSS in a separate files.
entry: {
app: resolve(CONFIG.fsharpEntry)
entry: isProduction ? {
app: [resolve(CONFIG.fsharpEntry), resolve(CONFIG.cssEntry)]
} : {
app: resolve(CONFIG.fsharpEntry),
style: resolve(CONFIG.cssEntry)
},
// Add a hash to the output file name in production
// to prevent browser caching if code changes
Expand Down

0 comments on commit b1b2787

Please sign in to comment.