@boomerang-io/webapp-spa-server 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -109,6 +109,15 @@ function createBoomerangServer({
109
109
  appRouter.use("/", express.static(path.join(process.cwd(), BUILD_DIR)));
110
110
  }
111
111
 
112
+ // Make sure that files with .css has a type="text/css" since they were throwing errors related to MIME check
113
+ app.use(express.static(APP_ROOT, {
114
+ setHeaders: function (res, path) {
115
+ if (path.endsWith(".css")) {
116
+ res.set("Content-Type", "text/css");
117
+ }
118
+ }
119
+ }));
120
+
112
121
  app.use(APP_ROOT, appRouter);
113
122
 
114
123
  // Start server on the specified port and binding host
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@boomerang-io/webapp-spa-server",
3
3
  "description": "Webapp Server for React-based SPA w/ client-side routing",
4
- "version": "1.3.2",
4
+ "version": "1.3.3",
5
5
  "author": {
6
6
  "name": "Tim Bula",
7
7
  "email": "timrbula@gmail.com"