mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
UPD: minicssextract plugin
This commit is contained in:
parent
ea81d42bd4
commit
f249be4f4a
@ -142,18 +142,16 @@ console.log('WebP images: ' + conf['webp']);
|
||||
console.log('GRAPHQL_API_KEY: ' + conf['GRAPHQL_API_KEY']);
|
||||
|
||||
const JSVARS = {
|
||||
'process.env': {
|
||||
NODE_ENV: JSON.stringify(NODE_ENV),
|
||||
},
|
||||
UINAME: JSON.stringify(UIInfo.name),
|
||||
UIVERSION: UIVERSION,
|
||||
UIAUTHOR: JSON.stringify(UIInfo.author),
|
||||
UIMetaNAME: JSON.stringify(UIMetaInfo.name),
|
||||
UIMetaVersion: JSON.stringify(UIMetaInfo.version),
|
||||
GRAPHQL_API_KEY: JSON.stringify(conf['GRAPHQL_API_KEY']),
|
||||
SWVERSION: JSON.stringify(`sw-${new Date().getTime()}`),
|
||||
BASE_HREF: JSON.stringify(''),
|
||||
};
|
||||
UINAME: JSON.stringify(UIInfo.name),
|
||||
UIVERSION: UIVERSION,
|
||||
UIAUTHOR: JSON.stringify(UIInfo.author),
|
||||
UIMetaNAME: JSON.stringify(UIMetaInfo.name),
|
||||
UIMetaVersion: JSON.stringify(UIMetaInfo.version),
|
||||
GRAPHQL_API_KEY: JSON.stringify(conf['GRAPHQL_API_KEY']),
|
||||
SWVERSION: JSON.stringify(`sw-${new Date().getTime()}`),
|
||||
BASE_HREF: JSON.stringify(''),
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
JSVARS: JSVARS,
|
||||
|
@ -13,7 +13,7 @@ const {
|
||||
merge,
|
||||
} = require('webpack-merge');
|
||||
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const { default: MiniCssExtractPlugin } = require('mini-css-extract-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
const IP = process.env.IP || conf.HOSTNAME;
|
||||
@ -113,7 +113,7 @@ const config = merge(common.webpack, {
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
}, ],
|
||||
},],
|
||||
},
|
||||
{
|
||||
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
||||
@ -122,7 +122,7 @@ const config = merge(common.webpack, {
|
||||
{
|
||||
test: /\.(gif|png|jpg|jpeg|ttf|otf|eot|svg|webp|woff(2)?)$/,
|
||||
type: 'asset/resource',
|
||||
}, ],
|
||||
},],
|
||||
},
|
||||
plugins: plugins,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user