Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mizok-neutec committed May 9, 2023
1 parent 0f215ca commit dbeb101
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 18 deletions.
Empty file removed dist/css/ex1.css
Empty file.
Empty file removed dist/css/ex2.css
Empty file.
8 changes: 1 addition & 7 deletions dist/css/main.css

Large diffs are not rendered by default.

Empty file removed dist/examples/ex1.d.ts
Empty file.
1 change: 0 additions & 1 deletion dist/examples/ex1.html

This file was deleted.

Empty file removed dist/examples/ex2.d.ts
Empty file.
1 change: 0 additions & 1 deletion dist/examples/ex2.html

This file was deleted.

2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="google" content="notranslate"/><meta name="format-detection" content="telephone=no"><title>Index</title><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;700;900&display=swap" rel="stylesheet"><link rel="icon" href="logo.svg"><script defer="defer" src="js/vendor.8daf7e4a19776156a357.js"></script><script defer="defer" src="js/main.c649ed5c070816ba3391.js"></script><link href="css/main.css" rel="stylesheet"></head><body><div class="playground" id="playground"><div class="playground__inner"><div class="playground__sidebar"><h1 class="playground__title">Webpack Playground Template</h1><div class="menu" id="menu"><div class="menu__inner"><div class="menu__list"><div class="menu__item"><a href="#" class="menu__link" data-route="ex1">ex1</a></div><div class="menu__item"><a href="#" class="menu__link" data-route="ex2">ex2</a></div></div></div></div></div><div class="playground__body"><button class="playground__toggler hamburger hamburger--collapse" id="playground-toggler" type="button"><span class="hamburger-box"><span class="hamburger-inner"></span></span></button><iframe src="examples/ex1.html" frameborder="0" class="playground__content" id="playground-content"></iframe></div></div></div></body></html>
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="google" content="notranslate"/><meta name="format-detection" content="telephone=no"><title>Index</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="chrome" content="notranslate"><meta name="description" content="site description"/><meta name="author" content="site author"><meta property="og:title" content="Index"><meta property="og:type" content="website"><meta property="og:url" content="site url"><meta property="og:image" content="https://www.google.com"><meta property="og:site_name" content="Index"><meta property="og:description" content="site description"><meta name="twitter:card" content="summary"/><meta name="twitter:site" content="site url"/><meta name="twitter:title" content="Index"/><meta name="twitter:description" content="site description"/><meta name="twitter:image" content="https://www.google.com"/><meta name="twitter:url" content="site url"/><meta itemprop="name" content="Index"><meta itemprop="description" content="site description"><meta itemprop="image" content="https://www.google.com"><title>Index</title><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;700;900&display=swap" rel="stylesheet"><script async src="https://www.googletagmanager.com/gtag/js?id="></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","")</script><link rel="icon" href="logo.svg"><script defer="defer" src="js/main.9047a1609f8fcb487cc5.js"></script><link href="css/main.css" rel="stylesheet"></head><body><header></header><footer></footer></body></html>
1 change: 0 additions & 1 deletion dist/js/ex1.4612e89ab4a6f398ac86.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/js/ex2.8edd21c91a5c1d50f6ad.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/js/main.c649ed5c070816ba3391.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/js/vendor.8daf7e4a19776156a357.js

This file was deleted.

4 changes: 0 additions & 4 deletions dist/main.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
declare function initToggler(): void;
declare function initMenuScroll(): void;
declare function initMenuLink(): void;
declare function main(): void;
10 changes: 10 additions & 0 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const CopyPlugin = require('copy-webpack-plugin');
const TerserPlugin = require("terser-webpack-plugin");
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
import * as webpack from 'webpack';
import 'webpack-dev-server'; // dont remove this import, it's for webpack-dev-server type
import HtmlWebpackPlugin from 'html-webpack-plugin';
Expand Down Expand Up @@ -230,6 +231,15 @@ const config = (env: any, argv: any): webpack.Configuration => {
new MiniCssExtractPlugin({
filename: 'css/[name].css'
}),
(()=>{
if(argv.mode=='production'){
return new BundleAnalyzerPlugin()
}
else{
return undefined;
}
})(),

new CopyPlugin(
{
patterns: [
Expand Down

0 comments on commit dbeb101

Please sign in to comment.