-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
42 lines (40 loc) · 1.11 KB
/
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
var path = require("path")
module.exports = (env,argv) => {
// console.log(argv)
return {
entry: './app/index.rb',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'www/js'),
},
module: {
rules: [
{
test: /\.rb$/,
loader: path.resolve('./iqeo_opal_loader.js'),
options: {
watch_dirs: [ "app", "lib" ]
}
}
]
},
devServer: {
// webpack js bundle (ruby->js) served from http://.../js/
publicPath: '/js/',
// non-webpack content served in order from...
// www first for non-ruby source ( js, html, css, img ) changes
// platforms/browser/www second for cordova platform stuff
contentBase: [
path.resolve(__dirname, 'www'),
path.resolve(__dirname, 'platforms/browser/www')
],
port: 8000
// // TODO: multiple reloads while index.html is edited before saving
// // consider html-loader for .html files approach ?
// watchContentBase: true,
// watchOptions: {
// ignored: /node_modules/
// }
}
}
}