Advertisement
Guest User

Untitled

a guest
May 8th, 2020
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.31 KB | None | 0 0
  1. const path = require('path');
  2.  
  3. module.exports = {
  4.     entry: './src/app.js',
  5.     output: {
  6.         filename: 'bundle.js',
  7.         path: path.resolve(__dirname, 'dist')
  8.     },
  9.     module: {
  10.         rules: [
  11.             {
  12.                 test: /\.(scss)$/,
  13.                 use: [
  14.                     {
  15.                         // Adds CSS to the DOM by injecting a `<style>` tag
  16.                         loader: 'style-loader'
  17.                     },
  18.                     {
  19.                         // Interprets `@import` and `url()` like `import/require()` and will resolve them
  20.                         loader: 'css-loader'
  21.                     },
  22.                     {
  23.                         // Loader for webpack to process CSS with PostCSS
  24.                         loader: 'postcss-loader',
  25.                         options: {
  26.                             plugins: function () {
  27.                                 return [
  28.                                     require('autoprefixer')
  29.                                 ];
  30.                             }
  31.                         }
  32.                     },
  33.                     {
  34.                         // Loads a SASS/SCSS file and compiles it to CSS
  35.                         loader: 'sass-loader'
  36.                     }
  37.                 ]
  38.             }
  39.         ]
  40.     }
  41. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement