Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safeupdate - Fix CSS #18

Merged
merged 15 commits into from
Oct 14, 2020
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