annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
468
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
1 const { environment } = require('@rails/webpacker')
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
2 const coffee = require('./loaders/coffee')
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
3
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
4 const webpack = require('webpack')
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
5 environment.plugins.append('Provide',
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
6 new webpack.ProvidePlugin({
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
7 $: 'jquery',
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
8 jQuery: 'jquery',
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
9 Popper: ['popper.js', 'default']
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
10 })
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
11 )
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
12
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
13 environment.loaders.prepend('coffee', coffee)
802dcd44188e Now with webpacker
nanaya <me@nanaya.pro>
parents:
diff changeset
14 module.exports = environment