react-tcplayer
Version:
react-tcplayer
42 lines (40 loc) • 951 B
JavaScript
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
mode: 'production',
entry: './src/reactTcplayer.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, './dist'),
libraryTarget: 'commonjs2',
},
module: {
rules: [
{
test: /\.js$/,
use: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.(png|jpe?g|gif)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 10240,
},
},
],
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.cm\.styl$/,
loader: 'style-loader!css-loader?modules&camelCase&localIdentName=[local]-[hash:base64:5]!stylus-loader',
},
],
},
externals: [nodeExternals()],
};