mirror of
https://github.com/titaniumnetwork-dev/Ultraviolet.git
synced 2025-05-14 04:20:00 -04:00
prettier
This commit is contained in:
parent
d230e0e551
commit
8f999e7236
42 changed files with 10481 additions and 8966 deletions
|
@ -9,40 +9,46 @@ const isDevelopment = process.env.NODE_ENV !== 'production';
|
|||
* @type {webpack.Configuration}
|
||||
*/
|
||||
const config = {
|
||||
mode: isDevelopment ? 'development' : 'production',
|
||||
entry: {
|
||||
bundle: fileURLToPath(new URL('./src/rewrite/index.js', import.meta.url)),
|
||||
handler: fileURLToPath(new URL('./src/uv.handler.js', import.meta.url)),
|
||||
sw: fileURLToPath(new URL('./src/uv.sw.js', import.meta.url)),
|
||||
},
|
||||
output: {
|
||||
path: fileURLToPath(new URL('./dist/', import.meta.url)),
|
||||
filename: 'uv.[name].js',
|
||||
},
|
||||
optimization: {
|
||||
minimize: !isDevelopment,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
exclude: ['sw.js', 'uv.config.js'],
|
||||
}),
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: fileURLToPath(new URL('./src/uv.config.js', import.meta.url)),
|
||||
},
|
||||
{
|
||||
from: fileURLToPath(new URL('./src/sw.js', import.meta.url)),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
performance: {
|
||||
// suppress "entrypoint size limit" warning
|
||||
hints: false,
|
||||
},
|
||||
mode: isDevelopment ? 'development' : 'production',
|
||||
entry: {
|
||||
bundle: fileURLToPath(
|
||||
new URL('./src/rewrite/index.js', import.meta.url)
|
||||
),
|
||||
handler: fileURLToPath(new URL('./src/uv.handler.js', import.meta.url)),
|
||||
sw: fileURLToPath(new URL('./src/uv.sw.js', import.meta.url)),
|
||||
},
|
||||
output: {
|
||||
path: fileURLToPath(new URL('./dist/', import.meta.url)),
|
||||
filename: 'uv.[name].js',
|
||||
},
|
||||
optimization: {
|
||||
minimize: !isDevelopment,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
exclude: ['sw.js', 'uv.config.js'],
|
||||
}),
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: fileURLToPath(
|
||||
new URL('./src/uv.config.js', import.meta.url)
|
||||
),
|
||||
},
|
||||
{
|
||||
from: fileURLToPath(
|
||||
new URL('./src/sw.js', import.meta.url)
|
||||
),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
performance: {
|
||||
// suppress "entrypoint size limit" warning
|
||||
hints: false,
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue