forked from caminitodelrey/e-commerce-site
/
webpack.common.js
45 lines (40 loc) · 866 Bytes
/
webpack.common.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
const path = require("path");
const webpack = require('webpack')
// const environmentVariables = [
// "BASE_URL",
// ];
module.exports = {
entry: path.join(__dirname, '/client/src/index.jsx'),
// plugins: [
// new webpack.EnvironmentPlugin(environmentVariables)
// ],
module: {
rules: [
{
test: /.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env", "@babel/preset-react"],
},
},
},
],
},
resolve: {
extensions: ['.js', '.jsx'],
alias: {
process: "process/browser"
},
fallback: {
"fs": false,
"os": false,
"path": false
},
},
output: {
filename: 'bundle.js',
path: '/Users/haleyjung/Documents/PROJECTS/2022/e-commerce-site/dist',
}
};