-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpackfile.regular.js
47 lines (45 loc) · 1.26 KB
/
webpackfile.regular.js
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
// 常规 - 不分离样式,不压缩,监听改动,用于开发调试
const webpack = require('webpack')
const path = require('path')
const fs = require('fs')
const INPUT_PATH = path.join(__dirname, '/_javascripts')
const OUTPUT_PATH = path.join(__dirname, '/')
module.exports = {
watch: true,
entry: path.resolve(__dirname, INPUT_PATH, 'entry.js'),
output: {
path: path.resolve(__dirname, OUTPUT_PATH),
filename: 'jqueryMaterial.js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['es2015'],
},
},
},
{
test: /\.css$/,
use: {
loader: 'css-loader'
}
},
{
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader']
},
{
// IDEA: webpack 字体打包
test: /\.(jpg|png|ttf|svg)$/,
use: {
loader: 'url-loader',
},
},
],
},
}