blob: 743cf66a8b6972628fd67eb3fbcf13ce1f348e11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
const { environment } = require('@rails/webpacker')
const coffee = require('./loaders/coffee')
const CleanWebpackPlugin = require('clean-webpack-plugin')
let pathsToClean = [
'public/packs'
];
// the clean options to use
let cleanOptions = {
root: __dirname + '/../../',
verbose: true,
dry: false
};
environment.plugins.append(
'CleanWebpack',
new CleanWebpackPlugin(pathsToClean, cleanOptions)
)
// const config = environment.toWebpackConfig()
// config.resolve.alias = {
// jquery: "jquery/src/jquery",
// }
environment.loaders.append('coffee', coffee)
module.exports = environment
|