Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const templateFn = require('adjust-sourcemap-loader')
.moduleFilenameTemplate({format: 'projectRelative'});
module.exports = {
entry: path.join(__dirname, process.env.ENTRY),
output: {
// NB: deep output path (weirdly) forces loader.context to be relative
path: path.join(__dirname, process.env.OUTPUT),
filename: '[name].js',
devtoolModuleFilenameTemplate: templateFn,
devtoolFallbackModuleFilenameTemplate: templateFn
},
devtool: JSON.parse(process.env.DEVTOOL),
module: {
loaders: [{
test: /\.scss$/,
loader: ExtractTextPlugin.extract([
'use strict';
const path = require('path');
const sassLoader = require.resolve('sass-loader');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const templateFn = require('adjust-sourcemap-loader')
.moduleFilenameTemplate({format: 'projectRelative'});
module.exports = {
entry: path.join(__dirname, process.env.ENTRY),
output: {
path: path.join(__dirname, process.env.OUTPUT),
filename: '[name].js',
devtoolModuleFilenameTemplate: templateFn,
devtoolFallbackModuleFilenameTemplate: templateFn
},
devtool: JSON.parse(process.env.DEVTOOL),
module: {
rules: [{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
'use strict';
const path = require('path');
const sassLoader = require.resolve('sass-loader');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const templateFn = require('adjust-sourcemap-loader')
.moduleFilenameTemplate({format: 'projectRelative'});
const extractSass = new ExtractTextPlugin({
filename: '[name].[contenthash].css',
disable: false,
allChunks: true
});
module.exports = {
entry: path.join(__dirname, process.env.ENTRY),
output: {
path: path.join(__dirname, process.env.OUTPUT),
filename: '[name].js',
devtoolModuleFilenameTemplate: templateFn,
devtoolFallbackModuleFilenameTemplate: templateFn
},