Sha256: 59f74a7c87d45cb163941b4458665b128878096efa8fb6b6eadc47c4687d26df
Contents?: true
Size: 1.06 KB
Versions: 3
Compression:
Stored size: 1.06 KB
Contents
const path = require('path'); const os = require('os'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const devMode = process.env.NODE_ENV != 'production' module.exports = { mode: devMode ? "development" : "production", entry: "<%= gem_dir %>/src/js/index.js", output: { filename: devMode ? "main.js" : "main.[contenthash].js", path: __dirname + "/dist", }, plugins: [ new CleanWebpackPlugin(), new MiniCssExtractPlugin({ filename: devMode ? '[name].css' : '[name].[contenthash].css' }), new HtmlWebpackPlugin({ template: os.tmpdir() + "/rtfdoc_output.html" }) ], devtool: devMode ? "inline-source-map" : "source-map", module: { rules: [ { test: /\.scss$/, use: [ MiniCssExtractPlugin.loader, // Translates CSS into CommonJS 'css-loader', // Compiles Sass to CSS 'sass-loader', ] } ] } };
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rtfdoc-0.1.2 | lib/rtfdoc/templates/webpack.config.js.erb |
rtfdoc-0.1.1 | lib/rtfdoc/templates/webpack.config.js.erb |
rtfdoc-0.1.0 | lib/rtfdoc/templates/webpack.config.js.erb |