Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { environment } = require('@rails/webpacker')
const erb = require('./loaders/erb')
const webpack = require("webpack")
environment.plugins.append("Provide", new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
Popper: ['popper.js', 'default']
}))
const config = environment.toWebpackConfig();
config.resolve.alias = {
jquery: 'jquery/src/jquery'
};
// bootstrap jquery setup
environment.loaders.prepend('erb', erb)
module.exports = environment
const { environment } = require('@rails/webpacker')
const webpack = require('webpack')
environment.plugins.prepend(
'Provide',
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
jquery: 'jquery'
})
)
const config = environment.toWebpackConfig()
config.resolve.alias = {
jquery: "jquery/src/jquery"
}
module.exports = environment
const { environment } = require('@rails/webpacker')
const webpack = require('webpack')
environment.plugins.append('Provide', new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
jquery: 'jquery'
}))
const config = environment.toWebpackConfig()
config.resolve.alias = {
jquery: 'jquery/src/jquery'
}
module.exports = environment