mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-15 20:16:39 +02:00
40 lines
712 B
JavaScript
40 lines
712 B
JavaScript
|
const path = require('path');
|
||
|
|
||
|
const include = path.resolve(__dirname, './src/scripts');
|
||
|
const exclude = /node_modules/;
|
||
|
|
||
|
/**
|
||
|
* @type {import('webpack').Configuration}
|
||
|
*/
|
||
|
module.exports = {
|
||
|
entry: ['./src/scripts/choices'],
|
||
|
output: {
|
||
|
library: 'Choices',
|
||
|
libraryTarget: 'umd',
|
||
|
libraryExport: 'default',
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
enforce: 'pre',
|
||
|
loader: 'eslint-loader',
|
||
|
test: /\.js?$/,
|
||
|
include,
|
||
|
exclude,
|
||
|
options: {
|
||
|
quiet: true,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
loader: 'babel-loader',
|
||
|
test: /\.js?$/,
|
||
|
include,
|
||
|
exclude,
|
||
|
options: {
|
||
|
babelrc: true,
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
};
|