-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconspect_webpack
55 lines (36 loc) · 1.5 KB
/
conspect_webpack
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// npm init
// npm install --save-dev webpack
// npm install --save-dev webpack-cli
// npm i -D less
// npm install -D style-loader less-loader file-loader css-loader
// npm install -D html-webpack-plugin clean-webpack-plugin
ADD TO SCRIPTS:
// "dev": "webpack --mode development",
// "build": "webpack --mode production",
// npm run dev
// npm install -D webpack-dev-server
ADD TO SCRIPTS:
// "start": "webpack-dev-server --open"
// npm install --save-dev babel-loader @babel/core
// npm i -D copy-webpack-plugin (favicon.ico)
// npm install --save-dev mini-css-extract-plugin (All css files bundle in one)
// npm i -D cross-env
CHANGE IN SCRIPTS:
// "scripts": {
// "dev": "cross-env NODE_ENV=development webpack --mode development",
// "build": "cross-env NODE_ENV=production webpack --mode production",
// "start": "cross-env NODE_ENV=development webpack-dev-server --mode development --open"
// },
// npm install terser-webpack-plugin --save-dev
// npm install --save-dev optimize-css-assets-webpack-plugin
// npm install --save-dev babel-loader @babel/core
// npm install @babel/preset-env --save-dev
// npm install --save-dev @babel/preset-react
// npm install --save @babel/polyfill (уже включено в сборку)
// npm i --save react react-dom
// npm i -D eslint-loader
// npm i -D eslint
// npm i -D babel-eslint
// npm install --save-dev webpack-bundle-analyzer
ADD TO SCRIPTS:
// "stats" : "webpack --json > stats.json && webpack-boundle-analyzer stats.json"