Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Commit 845ff12

Browse files
committed
Use style-loader for CSS imports
1 parent 0c14642 commit 845ff12

File tree

4 files changed

+5
-18
lines changed

4 files changed

+5
-18
lines changed

extension/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"mini-css-extract-plugin": "^0.8.0",
1414
"node-sass": "^4.12.0",
1515
"sass-loader": "^7.1.0",
16+
"style-loader": "^0.23.1",
1617
"ts-loader": "^5.3.3",
1718
"typescript": "^3.4.4",
1819
"webpack": "^4.30.0",

extension/src/config.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<head>
44
<meta charset="UTF-8">
55
<title>Sail Extension</title>
6-
<link rel="stylesheet" href="./config.css">
76
</head>
87

98
<body>
@@ -47,7 +46,7 @@ <h2>Approved Hosts</h2>
4746

4847
<tbody id="approved-hosts-entries">
4948
<tr>
50-
<td>Loading entries...</td>
49+
<td colspan="2">Loading entries...</td>
5150
</tr>
5251

5352
<!--

extension/src/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
setApprovedHosts,
55
addApprovedHost
66
} from "./common";
7+
import "./config.scss";
78

89
const sailStatus = document.getElementById("sail-status");
910
const sailAvailableStatus = document.getElementById("sail-available-status");
@@ -93,6 +94,7 @@ const reloadApprovedHostsTable = (): Promise<String[]> => {
9394
// No approved hosts.
9495
const tr = document.createElement("tr");
9596
const td = document.createElement("td");
97+
td.colSpan = 2;
9698
td.innerText = "No approved host entries found.";
9799
tr.appendChild(td);
98100
approvedHostsEntries.appendChild(tr);

extension/webpack.config.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const path = require("path");
22
const HappyPack = require("happypack");
3-
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
43
const os = require("os");
54
const CopyPlugin = require("copy-webpack-plugin");
65
const outDir = path.join(__dirname, "out");
@@ -14,8 +13,7 @@ const mainConfig = (plugins = []) => ({
1413
{
1514
test: /\.scss$/,
1615
use: [
17-
//process.env.NODE_ENV !== "production" ? "style-loader" : MiniCssExtractPlugin.loader,
18-
MiniCssExtractPlugin.loader,
16+
"style-loader",
1917
"css-loader",
2018
"sass-loader",
2119
],
@@ -89,17 +87,4 @@ module.exports = [
8987
filename: "config.js",
9088
},
9189
},
92-
{
93-
...mainConfig([
94-
new MiniCssExtractPlugin({
95-
filename: "config.css",
96-
chunkFilename: "config.css"
97-
}),
98-
]),
99-
entry: path.join(__dirname, "src", "config.scss"),
100-
output: {
101-
path: outDir,
102-
filename: "config.css.js",
103-
},
104-
},
10590
];

0 commit comments

Comments
 (0)