File size: 1,191 Bytes
d86254c 1809cfd d86254c c766f4e 1809cfd 8a554f1 c766f4e 8a554f1 c766f4e 22c7264 c766f4e 1809cfd d86254c c766f4e 1809cfd 8a554f1 1809cfd c766f4e ebda3a6 c766f4e |
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 ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
mode: 'development',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'./demo/demo.scss',
'./src/index.js',
],
output: {
path: path.join(__dirname, '/dist'),
publicPath: '/dist/',
filename: 'sholo.js',
libraryTarget: 'umd',
library: 'Sholo',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
enforce: 'pre',
options: {
failOnWarning: false,
failOnError: true,
},
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: ['env'],
plugins: ['babel-plugin-add-module-exports'],
},
},
{
test: /.scss$/,
loader: ExtractTextPlugin.extract(['css-loader', 'sass-loader']),
},
],
},
plugins: [
new ExtractTextPlugin({
filename: 'demo.css',
allChunks: true,
}),
],
stats: {
colors: true,
},
devtool: 'cheap-module-eval-source-map',
};
|