@ttskch/select2-bootstrap4-theme
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -5,4 +5,4 @@ $(function () { | ||
theme: 'bootstrap4', | ||
width: 'style', | ||
placeholder: $(this).attr('placeholder'), | ||
width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : 'style', | ||
placeholder: $(this).data('placeholder'), | ||
allowClear: Boolean($(this).data('allow-clear')), | ||
@@ -9,0 +9,0 @@ }); |
{ | ||
"name": "@ttskch/select2-bootstrap4-theme", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "Select2 v4 theme for Bootstrap4", | ||
@@ -42,3 +42,3 @@ "main": "", | ||
"precss": "^4.0.0", | ||
"sass-loader": "^7.1.0", | ||
"sass-loader": "^8.0.2", | ||
"style-loader": "^0.23.1", | ||
@@ -45,0 +45,0 @@ "webpack": "^4.27.0", |
@@ -9,61 +9,68 @@ const path = require('path'); | ||
let plugins = [ | ||
new ProvidePlugin({ | ||
$: 'jquery', | ||
jQuery: 'jquery', | ||
'window.jQuery': 'jquery', | ||
Popper: ['popper.js', 'default'], | ||
}), | ||
new ExtractTextPlugin({ | ||
filename: '[name]' + (isProd ? '.min' : '') + '.css', | ||
allChunks: true, | ||
}), | ||
new ProvidePlugin({ | ||
$: 'jquery', | ||
jQuery: 'jquery', | ||
'window.jQuery': 'jquery', | ||
Popper: ['popper.js', 'default'], | ||
}), | ||
new ExtractTextPlugin({ | ||
filename: '[name]' + (isProd ? '.min' : '') + '.css', | ||
allChunks: true, | ||
}), | ||
]; | ||
module.exports = { | ||
entry: { | ||
'select2-bootstrap4': [ | ||
'./src/layout.scss', | ||
], | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, './dist'), | ||
filename: '[name].js', | ||
}, | ||
module: { | ||
rules: [ | ||
entry: { | ||
'select2-bootstrap4': [ | ||
'./src/layout.scss', | ||
], | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, './dist'), | ||
filename: '[name].js', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.scss$/, | ||
use: ExtractTextPlugin.extract({ | ||
fallback: 'style-loader', | ||
use: [ | ||
{ | ||
test: /\.scss$/, | ||
use: ExtractTextPlugin.extract({ | ||
fallback: 'style-loader', | ||
use: [ | ||
{ | ||
loader: 'css-loader', | ||
}, | ||
{ | ||
loader: 'postcss-loader', | ||
options: { | ||
plugins: () => { | ||
let plugins = [ | ||
require('precss'), // bootstrap4 requires this | ||
require('autoprefixer'), | ||
]; | ||
if (isProd) { | ||
plugins = plugins.concat([ | ||
require('cssnano')({ preset: 'default' }), | ||
]) | ||
} | ||
loader: 'css-loader', | ||
}, | ||
{ | ||
loader: 'postcss-loader', | ||
options: { | ||
plugins: () => { | ||
let plugins = [ | ||
require('precss'), // bootstrap4 requires this | ||
require('autoprefixer'), | ||
]; | ||
if (isProd) { | ||
plugins = plugins.concat([ | ||
require('cssnano')({ preset: 'default' }), | ||
]) | ||
} | ||
return plugins; | ||
}, | ||
}, | ||
}, | ||
{ | ||
loader: 'sass-loader', | ||
}, | ||
], | ||
}), | ||
return plugins; | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
plugins: plugins, | ||
{ | ||
loader: 'sass-loader', | ||
options: { | ||
prependData: ` | ||
@import "~bootstrap/scss/functions"; | ||
@import "~bootstrap/scss/variables"; | ||
@import "~bootstrap/scss/mixins"; | ||
` | ||
} | ||
}, | ||
], | ||
}), | ||
}, | ||
], | ||
}, | ||
plugins: plugins, | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
29552
233