fix some dumb issues
This commit is contained in:
parent
43ddd3ef78
commit
0c344a048a
@ -164,6 +164,9 @@ let
|
|||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
ln -sf ${nodeSource}/node_modules .
|
ln -sf ${nodeSource}/node_modules .
|
||||||
|
rm -f webpack.config.js
|
||||||
|
rm -f wand.js
|
||||||
|
rm -f template.html
|
||||||
cp ${webpackConfigFile} webpack.config.js
|
cp ${webpackConfigFile} webpack.config.js
|
||||||
cp ${wandInit} wand.js
|
cp ${wandInit} wand.js
|
||||||
cp ${templateHtml} template.html
|
cp ${templateHtml} template.html
|
||||||
@ -171,11 +174,8 @@ let
|
|||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
ln -sf ${nodeSource}/node_modules .
|
ln -sf ${nodeSource}/node_modules .
|
||||||
rm webpack.config.js
|
|
||||||
cp ${webpackConfigFile} webpack.config.js
|
cp ${webpackConfigFile} webpack.config.js
|
||||||
rm wand.js
|
|
||||||
cp ${wandInit} wand.js
|
cp ${wandInit} wand.js
|
||||||
rm template.html
|
|
||||||
cp ${templateHtml} template.html
|
cp ${templateHtml} template.html
|
||||||
export NODE_PATH=$PWD/node_modules
|
export NODE_PATH=$PWD/node_modules
|
||||||
'';
|
'';
|
||||||
|
@ -78,6 +78,9 @@ prerenderOpts = (width, height, name) => ({
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
target: 'web',
|
target: 'web',
|
||||||
|
externals: {
|
||||||
|
svgo: 'svgo'
|
||||||
|
},
|
||||||
entry: magicFile(`
|
entry: magicFile(`
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
window.addEventListener('load', () => navigator.serviceWorker.register('/sw.js'));
|
window.addEventListener('load', () => navigator.serviceWorker.register('/sw.js'));
|
||||||
@ -121,6 +124,61 @@ module.exports = {
|
|||||||
new CopyPlugin([{ from: 'data', to: 'data' }, { from: 'wand.js', to: 'wand.js' }]),
|
new CopyPlugin([{ from: 'data', to: 'data' }, { from: 'wand.js', to: 'wand.js' }]),
|
||||||
new ImageminPlugin({
|
new ImageminPlugin({
|
||||||
jpegtran: { progressive: true },
|
jpegtran: { progressive: true },
|
||||||
|
svgo: null,
|
||||||
|
// svgo: {
|
||||||
|
// full: true,
|
||||||
|
// plugins: [
|
||||||
|
// { 'removeDoctype': { className: 'removeDoctype', attributes: [] } },
|
||||||
|
// { 'removeXMLProcInst': { className: 'removeXMLProcInst', attributes: [] } },
|
||||||
|
// { 'removeComments': { className: 'removeComments', attributes: [] } },
|
||||||
|
// { 'removeMetadata': { className: 'removeMetadata', attributes: [] } },
|
||||||
|
// { 'removeXMLNS': { className: 'removeXMLNS', attributes: [] } },
|
||||||
|
// { 'removeEditorsNSData': { className: 'removeEditorsNSData', attributes: [] } },
|
||||||
|
// { 'cleanupAttrs': { className: 'cleanupAttrs', attributes: [] } },
|
||||||
|
// { 'inlineStyles': { className: 'inlineStyles', attributes: [] } },
|
||||||
|
// { 'minifyStyles': { className: 'minifyStyles', attributes: [] } },
|
||||||
|
// { 'convertStyleToAttrs': { className: 'convertStyleToAttrs', attributes: [] } },
|
||||||
|
// { 'cleanupIDs': { className: 'cleanupIDs', attributes: [] } },
|
||||||
|
// { 'prefixIds': { className: 'prefixIds', attributes: [] } },
|
||||||
|
// { 'removeRasterImages': { className: 'removeRasterImages', attributes: [] } },
|
||||||
|
// { 'removeUselessDefs': { className: 'removeUselessDefs', attributes: [] } },
|
||||||
|
// { 'cleanupNumericValues': { className: 'cleanupNumericValues', attributes: [] } },
|
||||||
|
// { 'cleanupListOfValues': { className: 'cleanupListOfValues', attributes: [] } },
|
||||||
|
// { 'convertColors': { className: 'convertColors', attributes: [] } },
|
||||||
|
// { 'removeUnknownsAndDefaults': { className: 'removeUnknownsAndDefaults', attributes: [] } },
|
||||||
|
// { 'removeNonInheritableGroupAttrs': { className: 'removeNonInheritableGroupAttrs', attributes: [] } },
|
||||||
|
// { 'removeUselessStrokeAndFill': { className: 'removeUselessStrokeAndFill', attributes: [] } },
|
||||||
|
// { 'removeViewBox': { className: 'removeViewBox', attributes: [] } },
|
||||||
|
// { 'cleanupEnableBackground': { className: 'cleanupEnableBackground', attributes: [] } },
|
||||||
|
// { 'removeHiddenElems': { className: 'removeHiddenElems', attributes: [] } },
|
||||||
|
// { 'removeEmptyText': { className: 'removeEmptyText', attributes: [] } },
|
||||||
|
// { 'convertShapeToPath': { className: 'convertShapeToPath', attributes: [] } },
|
||||||
|
// { 'convertEllipseToCircle': { className: 'convertEllipseToCircle', attributes: [] } },
|
||||||
|
// { 'moveElemsAttrsToGroup': { className: 'moveElemsAttrsToGroup', attributes: [] } },
|
||||||
|
// { 'moveGroupAttrsToElems': { className: 'moveGroupAttrsToElems', attributes: [] } },
|
||||||
|
// { 'collapseGroups': { className: 'collapseGroups', attributes: [] } },
|
||||||
|
// { 'convertPathData': { className: 'convertPathData', attributes: [] } },
|
||||||
|
// { 'convertTransform': { className: 'convertTransform', attributes: [] } },
|
||||||
|
// { 'removeEmptyAttrs': { className: 'removeEmptyAttrs', attributes: [] } },
|
||||||
|
// { 'removeEmptyContainers': { className: 'removeEmptyContainers', attributes: [] } },
|
||||||
|
// { 'mergePaths': { className: 'mergePaths', attributes: [] } },
|
||||||
|
// { 'removeUnusedNS': { className: 'removeUnusedNS', attributes: [] } },
|
||||||
|
// { 'sortAttrs': { className: 'sortAttrs', attributes: [] } },
|
||||||
|
// { 'sortDefsChildren': { className: 'sortDefsChildren', attributes: [] } },
|
||||||
|
// { 'removeTitle': { className: 'removeTitle', attributes: [] } },
|
||||||
|
// { 'removeDesc': { className: 'removeDesc', attributes: [] } },
|
||||||
|
// { 'removeDimensions': { className: 'removeDimensions', attributes: [] } },
|
||||||
|
// { 'removeAttrs': { className: 'removeAttrs', attributes: [] } },
|
||||||
|
// { 'removeAttributesBySelector': { className: 'removeAttributesBySelector', attributes: [] } },
|
||||||
|
// { 'removeElementsByAttr': { className: 'removeElementsByAttr', attributes: [] } },
|
||||||
|
// { 'addClassesToSVGElement': { className: 'addClassesToSVGElement', attributes: [] } },
|
||||||
|
// { 'removeStyleElement': { className: 'removeStyleElement', attributes: [] } },
|
||||||
|
// { 'removeScriptElement': { className: 'removeScriptElement', attributes: [] } },
|
||||||
|
// { 'addAttributesToSVGElement': { className: 'addAttributesToSVGElement', attributes: [] } },
|
||||||
|
// { 'removeOffCanvasPaths': { className: 'removeOffCanvasPaths', attributes: [] } },
|
||||||
|
// { 'reusePaths': { className: 'reusePaths', attributes: [] } },
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
hash: true,
|
hash: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user