forked from jaredcwhite/jaredwhite_website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
42 lines (37 loc) · 972 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
40
41
42
const { merge } = require('webpack-merge')
var config = require("./config/webpack.defaults.js")
// Add any overrides to the default webpack config here:
//
// Eg:
//
// ```
// const path = require("path")
// config.resolve.modules.push(path.resolve(__dirname, 'frontend', 'components'))
// config.resolve.alias.frontendComponents = path.resolve(__dirname, 'frontend', 'components')
// ```
//
// You can also merge in a custom config using the included `webpack-merge` package.
// Complete docs available at: https://github.com/survivejs/webpack-merge
//
// Eg:
//
// ```
// const customConfig = { ..... }
// config = merge(config, customConfig)
// ```
config.module.rules.push(
{
test: /\.js\.rb$/,
use: [
{
loader: "esbuild-loader",
options: {
target: 'es2016'
},
},
"@ruby2js/webpack-loader"
]
}
)
////////////////////////////////////////////////////////
module.exports = config