2019-11-04 15:00:46 +01:00
|
|
|
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
|
|
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
|
|
|
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
2020-01-29 13:35:12 +01:00
|
|
|
const DynamicCdnWebpackPlugin = require('dynamic-cdn-webpack-plugin');
|
2019-11-04 15:00:46 +01:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: './src/index.js',
|
|
|
|
output: {
|
|
|
|
filename: '[name].bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'dist')
|
|
|
|
},
|
|
|
|
devtool: 'inline-source-map',
|
|
|
|
plugins: [
|
|
|
|
new ExtractTextPlugin("styles.css"),
|
|
|
|
new webpack.ProvidePlugin({ // inject ES5 modules as global vars
|
|
|
|
Tether: 'tether'
|
|
|
|
})
|
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: ExtractTextPlugin.extract({
|
|
|
|
fallback: 'style-loader',
|
|
|
|
use: 'css-loader'
|
|
|
|
})
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|svg|jpg|gif)$/,
|
|
|
|
use: [
|
|
|
|
'file-loader'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(woff|woff2|eot|ttf|otf)$/,
|
|
|
|
use: [
|
|
|
|
'file-loader'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|