Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jessicamindel
Created July 31, 2017 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessicamindel/fe9aee1a13d1f2fa994dbef50ffde853 to your computer and use it in GitHub Desktop.
Save jessicamindel/fe9aee1a13d1f2fa994dbef50ffde853 to your computer and use it in GitHub Desktop.
var path = require("path");
var config = {
entry: ["./src/raw/index.tsx"],
output: {
path: path.resolve(__dirname, "build/js"),
filename: "bundle.js"
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".jsx", ".css", ".scss", ".json"]
},
devtool: "source-map",
module: {
rules: [
{
test: /\.tsx?$/,
include: [
path.resolve(__dirname, "src/raw")
],
use: [
{ loader: "awesome-typescript-loader" }
]
},
{
test: /\.json$/,
include: [
path.resolve(__dirname, "src/raw")
],
use: [
{ loader: "json-loader" }
]
},
{
test: /\.scss$/,
include: [
path.resolve(__dirname, "src/raw")
],
use: [
{ loader: "style-loader" },
{ loader: "css-loader" },
{
loader: "typings-for-css-modules-loader",
options: {
namedExport: true,
camelCase: true
}
},
{ loader: "sass-loader" }
]
}
]
}
};
module.exports = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment