diff options
Diffstat (limited to 'config/webpack/environment.js')
| -rw-r--r-- | config/webpack/environment.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/config/webpack/environment.js b/config/webpack/environment.js new file mode 100644 index 000000000..ae1deb610 --- /dev/null +++ b/config/webpack/environment.js @@ -0,0 +1,36 @@ +const { environment } = require('@rails/webpacker') +const webpack = require('webpack') +const UglifyJsPlugin = require('uglify-js') +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.set( + 'CleanWebpack', + new CleanWebpackPlugin(pathsToClean, cleanOptions) +) + +// environment.plugins.set('Provide', new webpack.ProvidePlugin({ +// $: 'jquery', +// jQuery: 'jquery', +// jquery: 'jquery' +// }) +// ) + +// const config = environment.toWebpackConfig() + +// config.resolve.alias = { +// jquery: "jquery/src/jquery", +// } + +module.exports = environment
\ No newline at end of file |
