This repository was archived by the owner on Nov 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.config.js
More file actions
56 lines (55 loc) · 1.64 KB
/
webpack.config.js
File metadata and controls
56 lines (55 loc) · 1.64 KB
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
50
51
52
53
54
55
56
const path = require('path');
const StylablePlugin = require('stylable-integration/webpack-plugin');
const stylableOptions = { injectBundleCss: true, nsDelimiter:'--' };
module.exports = {
devtool: 'source-map',
entry: {
demos: ['core-js/shim', './demo/index.tsx'],
tests: ['core-js/shim', './test/utils/mobx.config.ts', 'mocha-loader!./test/webpack.ts']
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: {
compilerOptions: {
"declaration": false
}
}
},
{
test: /\.js$/,
include: [
path.dirname(require.resolve('chai-as-promised')),
path.dirname(require.resolve('chai-style')),
path.join(__dirname, 'node_modules', 'webpack-dev-server', 'client')
],
loader: 'ts-loader',
options: {
// needed so it has a separate transpilation instance
instance: 'lib-compat',
transpileOnly: true
}
},
{
test: /\.css$/,
loader: 'stylable-integration/webpack-loader',
options: stylableOptions
}
]
},
resolve: {
extensions: ['.ts', '.tsx', '.js']
},
output: {
filename: '[name].js',
pathinfo: true
},
devServer: {
disableHostCheck: true
},
plugins: [
new StylablePlugin(stylableOptions)
]
}