Files
codeocean/config/webpack/environment.js
Sebastian Serth 26c2069e02 Move d3 to package.json and include I18n JS library though Gemfile
Also, update bundle to make it installable again (a version had been removed)
2019-03-09 00:31:56 +01:00

35 lines
903 B
JavaScript

/*
./config/webpack/environment.js
Info for this file can be found
github.com/rails/webpacker/blob/master/docs/webpack.md
*/
const { environment } = require('@rails/webpacker');
const merge = require('webpack-merge');
const webpack = require('webpack');
// Add an additional plugin of your choosing : ProvidePlugin
environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
$: 'jquery',
JQuery: 'jquery',
jquery: 'jquery',
'window.Tether': "tether",
Popper: ['popper.js', 'default'], // for Bootstrap 4
_: 'underscore',
vis: 'vis',
hljs: 'highlight.js',
d3: 'd3',
})
);
const envConfig = module.exports = environment;
const aliasConfig = module.exports = {
resolve: {
alias: {
jquery: 'jquery/src/jquery',
}
}
};
module.exports = merge(envConfig.toWebpackConfig(), aliasConfig);