mirror of https://github.com/linkerd/linkerd2.git
42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
entry: './js/index.js',
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
publicPath: 'dist/',
|
|
filename: 'index_bundle.js'
|
|
},
|
|
// devtool: 'inline-cheap-source-map', // uncomment for nicer logging, makes dev slower
|
|
externals: {
|
|
cheerio: 'window',
|
|
'react/addons': 'react',
|
|
'react/lib/ExecutionEnvironment': 'react',
|
|
'react/lib/ReactContext': 'react',
|
|
'react-addons-test-utils': 'react-dom',
|
|
},
|
|
module: {
|
|
rules: [
|
|
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
|
|
{ test: /\.jsx$/, loader: 'babel-loader', exclude: /node_modules/ },
|
|
{
|
|
test: /\.css$/,
|
|
use: [
|
|
'style-loader',
|
|
{ loader: 'css-loader', options: { importLoaders: 1 } },
|
|
'postcss-loader'
|
|
]
|
|
},
|
|
{
|
|
test: /\.(png|jpg|gif|eot|svg|ttf|woff|woff2)$/,
|
|
use: [
|
|
{
|
|
loader: 'file-loader',
|
|
options: { publicPath: 'dist/' }
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|