forked from okkur/syna
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
39 lines (38 loc) · 979 Bytes
/
webpack.config.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
const path = require('path');
module.exports = {
entry: {
head: './assets/js/head.js',
main: './assets/js/index.js',
collapse: './assets/js/collapse.js',
contact: './assets/js/contact.js',
graph: './assets/js/graph.js',
hero: './assets/js/hero.js',
portfolio: './assets/js/portfolio.js',
pricing: './assets/js/pricing.js',
react: './assets/js/react.js',
search: './assets/js/search.js',
stripe: './assets/js/stripe.js',
},
output: {
path: path.resolve('./assets/scripts/'),
filename: 'syna-[id].js'
},
resolve: {
extensions: ['.js', '.jsx'],
modules: [path.join(process.cwd(), 'src'), 'node_modules'],
},
mode: process.env === 'production' ? 'production' : 'development',
module: {
rules: [{
test: /\.jsx?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['env', 'react'],
},
},
}],
},
plugins: [],
};