diff config/webpack/environment.js @ 468:802dcd44188e

Now with webpacker
author nanaya <me@nanaya.pro>
date Sun, 23 Feb 2020 20:23:09 +0900
parents
children 68231013b01b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/webpack/environment.js	Sun Feb 23 20:23:09 2020 +0900
@@ -0,0 +1,14 @@
+const { environment } = require('@rails/webpacker')
+const coffee =  require('./loaders/coffee')
+
+const webpack = require('webpack')
+environment.plugins.append('Provide',
+  new webpack.ProvidePlugin({
+    $: 'jquery',
+    jQuery: 'jquery',
+    Popper: ['popper.js', 'default']
+  })
+)
+
+environment.loaders.prepend('coffee', coffee)
+module.exports = environment