mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-29 01:30:16 +02:00
fix preact.config and add icon
This commit is contained in:
@@ -11,43 +11,40 @@ import CopyWebpackPlugin from 'copy-webpack-plugin'
|
||||
export default function (config, env, helpers) {
|
||||
if (env.isProd) {
|
||||
config.devtool = false; // disable sourcemaps
|
||||
|
||||
config.plugins.push(new CopyWebpackPlugin([{
|
||||
context: `${__dirname}/src/assets`,
|
||||
from: `*.*`
|
||||
}, {
|
||||
from: `${__dirname}/src/lib`,
|
||||
to: 'lib/'
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/detached-window.js`
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/*.ttf`
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/patreon.png`
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/preview.html`
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/style.css`
|
||||
}
|
||||
]));
|
||||
|
||||
const {
|
||||
plugin
|
||||
} = helpers.getPluginsByName(config, 'SWPrecacheWebpackPlugin')[0];
|
||||
plugin.options.maximumFileSizeToCacheInBytes = 2900000;
|
||||
|
||||
const {
|
||||
index
|
||||
} = helpers.getPluginsByName(config, 'UglifyJsPlugin')[0]
|
||||
config.plugins.splice(index, 1)
|
||||
}
|
||||
config.plugins.push(new CopyWebpackPlugin([{
|
||||
context: `${__dirname}/src/assets`,
|
||||
from: `*.*`
|
||||
}, {
|
||||
from: `${__dirname}/src/lib`,
|
||||
to: 'lib/'
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/detached-window.js`
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/*.ttf`
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/patreon.png`
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/preview.html`
|
||||
},
|
||||
{
|
||||
from: `${__dirname}/src/style.css`
|
||||
}
|
||||
]));
|
||||
|
||||
// let plugins = helpers.getPlugins();
|
||||
// console.log(helpers.getPlugins(config));
|
||||
|
||||
const {
|
||||
plugin
|
||||
} = helpers.getPluginsByName(config, 'SWPrecacheWebpackPlugin')[0];
|
||||
console.log(plugin)
|
||||
plugin.options.maximumFileSizeToCacheInBytes = 2900000;
|
||||
|
||||
|
||||
let {
|
||||
index
|
||||
} = helpers.getPluginsByName(config, 'UglifyJsPlugin')[0]
|
||||
config.plugins.splice(index, 1)
|
||||
}
|
||||
|
BIN
webmaker/src/icon-128.png
Normal file
BIN
webmaker/src/icon-128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Reference in New Issue
Block a user