How to use the adjust-sourcemap-loader.moduleFilenameTemplate function in adjust-sourcemap-loader

To help you get started, we’ve selected a few adjust-sourcemap-loader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bholloway / resolve-url-loader / test / platforms / webpack1-sassloader3-sass4 / webpack.config.js View on Github external
'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([
github bholloway / resolve-url-loader / test / platforms / webpack4-sassloader7-sass4 / webpack.config.js View on Github external
'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,
github bholloway / resolve-url-loader / test / platforms / webpack2-sassloader6-sass4 / webpack.config.js View on Github external
'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
  },

adjust-sourcemap-loader

Webpack loader that adjusts source maps

MIT
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis

Popular adjust-sourcemap-loader functions