-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathwebpack.config.js
More file actions
42 lines (38 loc) · 785 Bytes
/
webpack.config.js
File metadata and controls
42 lines (38 loc) · 785 Bytes
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
// Project settings
let project = 'react-console';
// Build system
let FailPlugin = require('webpack-fail-plugin');
let ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
context: __dirname,
entry: './src/example.tsx',
output: {
path: __dirname + '/dist',
filename: project + '.example.js',
library: "Example",
libraryTarget: "var",
},
module: {
loaders: [
{
test: /\.tsx?$/,
loader: "ts-loader",
},
{
test: /\.s?css$/,
loader: ExtractTextPlugin.extract("css-loader?sourceMap!sass-loader?sourceMap"),
},
],
preLoaders: [
{
test: /\.(css|js)$/,
loader: "source-map-loader",
}
],
},
devtool: 'source-map',
plugins: [
FailPlugin,
new ExtractTextPlugin(project + '.example.css'),
],
};