mirror of
https://github.com/jxnblk/mdx-deck.git
synced 2024-09-17 09:57:23 +03:00
Merge pull request #288 from jxnblk/fix-css-loader
Use mini-css-extract-plugin instead of style-loader - fixes #279
This commit is contained in:
commit
ecd847240a
@ -73,7 +73,7 @@ const defaultTemplate = ({
|
||||
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||||
<style>*{box-sizing:border-box}body{margin:0;font-family:system-ui,sans-serif}</style>
|
||||
<meta name='generator' content='mdx-deck'>
|
||||
${head}${css}${links}
|
||||
${head}${links}
|
||||
</head>
|
||||
<body>
|
||||
<div id=root>${body}</div>
|
||||
|
@ -3,6 +3,7 @@ const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const WebpackBar = require('webpackbar')
|
||||
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
||||
const MiniCSSExtractPlugin = require('mini-css-extract-plugin')
|
||||
const merge = require('webpack-merge')
|
||||
const chalk = require('chalk')
|
||||
const remark = {
|
||||
@ -44,7 +45,7 @@ const rules = [
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader'].map(require.resolve),
|
||||
use: [MiniCSSExtractPlugin.loader, require.resolve('css-loader')],
|
||||
},
|
||||
]
|
||||
|
||||
@ -72,6 +73,10 @@ const baseConfig = {
|
||||
name: '[mdx-deck]',
|
||||
}),
|
||||
new FriendlyErrorsPlugin(),
|
||||
new MiniCSSExtractPlugin({
|
||||
filename: '[name].css',
|
||||
chunkFilename: '[id].css',
|
||||
}),
|
||||
],
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
"find-up": "^3.0.0",
|
||||
"friendly-errors-webpack-plugin": "^1.7.0",
|
||||
"meow": "^5.0.0",
|
||||
"mini-css-extract-plugin": "^0.5.0",
|
||||
"pkg-conf": "^2.1.0",
|
||||
"react": "^16.8.3",
|
||||
"react-dev-utils": "^7.0.3",
|
||||
@ -50,7 +51,6 @@
|
||||
"remark-unwrap-images": "^0.1.0",
|
||||
"rimraf": "^2.6.3",
|
||||
"serve-static": "^1.13.2",
|
||||
"style-loader": "^0.23.1",
|
||||
"webpack": "^4.29.6",
|
||||
"webpack-dev-middleware": "^3.6.0",
|
||||
"webpack-hot-client": "^4.1.1",
|
||||
|
17
yarn.lock
17
yarn.lock
@ -6546,6 +6546,15 @@ mimic-fn@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
|
||||
integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
|
||||
|
||||
mini-css-extract-plugin@^0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.5.0.tgz#ac0059b02b9692515a637115b0cc9fed3a35c7b0"
|
||||
integrity sha512-IuaLjruM0vMKhUUT51fQdQzBYTX49dLj8w68ALEAe2A4iYNpIC4eMac67mt3NzycvjOlf07/kYxJDc0RTl1Wqw==
|
||||
dependencies:
|
||||
loader-utils "^1.1.0"
|
||||
schema-utils "^1.0.0"
|
||||
webpack-sources "^1.1.0"
|
||||
|
||||
minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
|
||||
@ -9070,14 +9079,6 @@ strong-log-transformer@^2.0.0:
|
||||
minimist "^1.2.0"
|
||||
through "^2.3.4"
|
||||
|
||||
style-loader@^0.23.1:
|
||||
version "0.23.1"
|
||||
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925"
|
||||
integrity sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==
|
||||
dependencies:
|
||||
loader-utils "^1.1.0"
|
||||
schema-utils "^1.0.0"
|
||||
|
||||
style-to-object@^0.2.1:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.2.2.tgz#3ea3b276bd3fa9da1195fcdcdd03bc52aa2aae01"
|
||||
|
Loading…
Reference in New Issue
Block a user