Skip to content

Commit 3a5a798

Browse files
authored
Move to webpack css-loader (OctoLinker#378)
1 parent d8683cb commit 3a5a798

File tree

9 files changed

+617
-28
lines changed

9 files changed

+617
-28
lines changed

assets/manifest.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
"js": [
3232
"app.js"
3333
],
34-
"css": [
35-
"style.css"
36-
],
3734
"run_at": "document_idle",
3835
"all_frames": false
3936
}

assets/options.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
<head>
33
<meta charset="UTF-8">
44
<title></title>
5-
<link href="core.css" media="all" rel="stylesheet" />
6-
<link href="form.css" media="all" rel="stylesheet" />
7-
<link href="options.css" media="all" rel="stylesheet" />
85
</head>
96
<body>
107
<div id="options"></div>
File renamed without changes.

lib/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'core-js/fn/object/entries';
22
import OctoLinker from './octo-linker.js';
33
import * as storage from './options/storage.js';
4+
import './app.css';
45

56
storage.load().then(() => {
67
const octoLinker = new OctoLinker();

lib/options/page.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import 'primer-core/build/build.css';
2+
import 'primer-forms/build/build.css';
3+
import './options.css';
4+
15
import components from './components';
26
import * as storage from './storage';
37
import { options } from './options';

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"chrome-promise": "^2.1.1",
6060
"concat-map": "^0.0.1",
6161
"core-js": "^2.5.1",
62+
"css-loader": "^0.28.7",
6263
"escape-regex-string": "^1.0.4",
6364
"findandreplacedomtext": "^0.4.5",
6465
"github-injection": "^1.0.1",
@@ -73,6 +74,7 @@
7374
"querystring": "^0.2.0",
7475
"semver": "^5.4.1",
7576
"semver-regex": "^1.0.0",
77+
"style-loader": "^0.19.0",
7678
"uuid": "^3.1.0",
7779
"xregexp": "^3.2.0"
7880
},

webpack.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ module.exports = {
1818
], {
1919
ignore: ['manifest.json'],
2020
}),
21-
new CopyWebpackPlugin([
22-
{ from: 'node_modules/primer-core/build/', to: 'core.css' },
23-
{ from: 'node_modules/primer-forms/build/', to: 'form.css' },
24-
]),
2521
],
2622
module: {
27-
loaders: [
23+
rules: [
24+
{
25+
test: /\.css$/,
26+
use: ['style-loader', 'css-loader'],
27+
},
2828
{
2929
test: /\.js$/,
3030
exclude: /(node_modules)/,
31-
loader: 'babel-loader',
31+
use: 'babel-loader',
3232
},
3333
],
3434
},

0 commit comments

Comments
 (0)