Add Sass to Webpack build

This commit is contained in:
Ian Minoso 2016-11-02 14:15:52 -04:00
parent 74b6944b0d
commit 99626d907f
5 changed files with 15 additions and 17 deletions

View file

@ -2,34 +2,24 @@ var webpack = require('webpack');
var path = require("path");
var config = {
/*
* The entry point to the application
*/
entry: ["./static/js/app.tsx"],
/*
* Output path of bundle
*/
output: {
path: path.resolve(__dirname, "static/js/build"),
filename: "bundle.js"
},
/*
* specify files to search for
*/
resolve: {
extensions: ["", ".ts", ".tsx", ".js"]
},
module: {
/*
* Regex associated with the loader
*/
loaders: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
}
]
}