mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-02 22:03:11 +02:00
6848970fd9
* simplify babel config * fix Cypress VSCode checks * introduce webpack base config * fix flacky cypress test * fix class properties definition * fix default export * upgrade affected deps, decrease bundlesize * run ESLint only on changed files
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,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
};
|