Advertisement
Guest User

Untitled

a guest
Sep 7th, 2019
132
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.07 KB | None
  1. const path = require('path');
  2.  
  3. const sassConfig = {
  4.   entry: [
  5.     './src/sass/index.sass'
  6.   ],
  7.   devtool: 'inline-source-map',
  8.   module: {
  9.     rules: [
  10.       {
  11.         test: /\.s[ac]ss$/,
  12.         use: [
  13.           'css-loader',
  14.           'sass-loader'
  15.         ]
  16.       }
  17.     ]
  18.   },
  19.   resolve: {
  20.     extensions: ['.sass', '.scss', '.css']
  21.   },
  22.   output: {
  23.     filename: 'build.css',
  24.     path: path.resolve(__dirname, 'css')
  25.   },
  26.   watch: true
  27. };
  28.  
  29. const tsConfig = {
  30.   entry: [
  31.     './src/typescript/index.ts'
  32.   ],
  33.   devtool: 'inline-source-map',
  34.   module: {
  35.     rules: [
  36.       {
  37.         test: /\.s[ac]ss$/,
  38.         use: [
  39.           'style-loader',
  40.           'css-loader',
  41.           'sass-loader'
  42.         ]
  43.       },
  44.       {
  45.         test: /\.tsx?$/,
  46.         use: 'ts-loader',
  47.         exclude: /node_modules/
  48.       }
  49.     ]
  50.   },
  51.   resolve: {
  52.     extensions: ['.tsx', '.ts', '.js']
  53.   },
  54.   output: {
  55.     filename: 'build.js',
  56.     path: path.resolve(__dirname, 'js')
  57.   },
  58.   watch: true
  59. };
  60.  
  61. module.exports = [
  62.   sassConfig,
  63.   tsConfig
  64. ];
Advertisement
RAW Paste Data Copied
Advertisement