Expose jQuery for use outside Webpack build

master
hoellen 5 years ago
parent 90f678de52
commit b351841418

@ -15,6 +15,7 @@
"babel-loader": "^8.0.5", "babel-loader": "^8.0.5",
"bootstrap": "^3.4.1", "bootstrap": "^3.4.1",
"css-loader": "^2.1.1", "css-loader": "^2.1.1",
"expose-loader": "^0.7.5",
"file-loader": "^3.0.1", "file-loader": "^3.0.1",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"font-awesome-loader": "^1.0.2", "font-awesome-loader": "^1.0.2",

@ -17,7 +17,6 @@ module.exports = {
{ {
test: /\.js$/, test: /\.js$/,
use: ['babel-loader'] use: ['babel-loader']
}, },
{ {
test: /\.scss$/, test: /\.scss$/,
@ -34,6 +33,17 @@ module.exports = {
{ {
test: /\.woff($|\?)|\.woff2($|\?)|\.ttf($|\?)|\.eot($|\?)|\.svg($|\?)/, test: /\.woff($|\?)|\.woff2($|\?)|\.ttf($|\?)|\.eot($|\?)|\.svg($|\?)/,
use: ['url-loader'] use: ['url-loader']
},
{
// Exposes jQuery for use outside Webpack build
test: require.resolve('jquery'),
use: [{
loader: 'expose-loader',
options: 'jQuery'
}, {
loader: 'expose-loader',
options: '$'
}]
} }
] ]
}, },

Loading…
Cancel
Save