forked from habitlab/habitlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack_config_test.ls
49 lines (39 loc) · 969 Bytes
/
webpack_config_test.ls
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
48
49
require! {
path
process
livescript
}
RewirePlugin = require 'rewire-webpack'
cwd = process.cwd()
npmdir = (x) ->
path.join(cwd, 'node_modules', x)
fromcwd = (x) ->
path.join(cwd, x)
webpack_config = require('./webpack.config.ls')
webpack_config.module.loaders = [
{
test: /\.ls$/
loader: 'livescript-async-loader'
include: [fromcwd('test'), fromcwd('src')]
exclude: [
fromcwd('src/components_skate')
fromcwd('node_modules')
fromcwd('bower_components')
]
},
{
test: /\.js$/
#loader: 'null-loader'
include: [fromcwd('test'), fromcwd('src')]
exclude: [
fromcwd('src/components_skate')
fromcwd('node_modules')
fromcwd('bower_components')
]
}
]
#webpack_config.plugins.push(new RewirePlugin())
{get_alias_info} = require './alias_utils.ls'
for lib_info in get_alias_info()
webpack_config.resolve.alias[lib_info.path] = lib_info.backend
module.exports = webpack_config