[SSE mobile] inline skeleton styles to html
This commit is contained in:
parent
858c7a3ad4
commit
594db69572
|
@ -23,7 +23,11 @@
|
|||
<link rel="apple-touch-icon" href="static/icons/apple-touch-icon.png">
|
||||
<link rel="icon" href="static/icons/favicon.png">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../common/mobile/resources/less/skeleton.css">
|
||||
<% if (!htmlWebpackPlugin.options.skeleton.content) { %>
|
||||
<link rel="stylesheet" href="../../common/mobile/resources/css/skeleton.css">
|
||||
<% } else { %>
|
||||
<style><%= htmlWebpackPlugin.options.skeleton.content %></style>
|
||||
<% } %>
|
||||
|
||||
<!-- built styles file will be auto injected -->
|
||||
</head>
|
||||
|
|
10
vendor/framework7-react/build/webpack.config.js
vendored
10
vendor/framework7-react/build/webpack.config.js
vendored
|
@ -89,6 +89,7 @@ module.exports = {
|
|||
|
||||
{
|
||||
test: /\.css$/,
|
||||
exclude: [/skeleton\.css$/i],
|
||||
use: [
|
||||
(env === 'development' ? 'style-loader' : {
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
|
@ -188,6 +189,9 @@ module.exports = {
|
|||
// new webpack.NamedModulesPlugin(),
|
||||
]),
|
||||
// new CleanWebpackPlugin(),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'css/[name].css',
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
filename: `../../../apps/${editor}/mobile/index.html`,
|
||||
template: `../../apps/${editor}/mobile/src/index_dev.html`,
|
||||
|
@ -200,9 +204,9 @@ module.exports = {
|
|||
removeStyleLinkTypeAttributes: true,
|
||||
useShortDoctype: true
|
||||
} : false,
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'css/[name].css',
|
||||
skeleton: {
|
||||
content: env === 'development' ? undefined : fs.readFileSync(`../../apps/common/mobile/resources/css/skeleton.css`),
|
||||
},
|
||||
}),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
|
|
Loading…
Reference in a new issue