Skip to content

Commit b7f4487

Browse files
committed
add bundle-analyzer
1 parent 8e4f162 commit b7f4487

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

template/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"scripts": {
55
"dev": "poi",
66
"build": "poi build",
7+
"build:analyze": "poi build --bundle-report",
78
"serve": "serve dist -l 8000",
89
"lint": "eslint --ext .js,.jsx --ignore-path .gitignore .",
910
"lint:fix": "eslint --fix --ext .js,.jsx --ignore-path .gitignore ."
@@ -19,6 +20,7 @@
1920
"react-dom": "^16.4.0"
2021
},
2122
"devDependencies": {
23+
"@poi/plugin-bundle-report": "^10.0.1",
2224
"@poi/plugin-eslint": "^10.0.2",<% if (pwa) { %>
2325
"@poi/plugin-offline": "^10.0.1",<% } %>
2426
"babel-eslint": "^8.2.3",

template/poi.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = {
66
env: true,
77
entry: 'src/index.js',
88
plugins: [
9+
require('@poi/plugin-bundle-report')(),
910
require('@poi/plugin-eslint')(),<% if(pwa) { %>
1011
require('@poi/plugin-offline')(),<% } %>
1112
],

template/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const makeRender = () => ({ router }) => {
1212
const router = setupRouter();
1313
router.respond(makeRender());
1414
<% } else { %>
15+
1516
const render = Component => {
1617
ReactDOM.render(<Component />, document.getElementById('app'));
1718
};

template/src/styles/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import './main.css';
2-
<% if(tailwindcss) { %>
1+
import './main.css';<% if(tailwindcss) { %>
32
import './tailwind.scss';
43
<% } %>

0 commit comments

Comments
 (0)