Last active
April 13, 2016 22:31
-
-
Save chrisschreiner/eb1b36c86dd89029aa779400a824d4ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
module.exports = { | |
resolveLoader: { | |
root: __dirname + "/node_modules" | |
}, | |
plugins: [ | |
new webpack.ProvidePlugin({ | |
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch' | |
}), | |
new ExtractTextPlugin("[name].css", {allChunks: true}) | |
], | |
entry: [ | |
'./src/css/sample.scss', | |
"./src/index.tsx", | |
], | |
output: { | |
filename: "./dist/bundle.js", | |
}, | |
devtool: "source-map", | |
resolve: { | |
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js", ".scss"] | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.tsx?$/, | |
loader: "ts-loader" | |
}, | |
{ | |
test: /\.scss$/, | |
exlude: /node_modules/, | |
include: './src/css', | |
loader: ['style', 'css', 'sass'] | |
} | |
], | |
preLoaders: [ | |
{ test: /\.js$/, loader: "source-map-loader" } | |
] | |
}, | |
externals: { | |
"react": "React", | |
"react-dom": "ReactDOM" | |
}, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background: #f00; | |
} | |
question { | |
display: flex; | |
padding: 1em; | |
} | |
searchbox { | |
display: flex; | |
background: red; | |
margin: 1em; | |
padding: 1em; | |
border: solid 1px black; | |
width: 300px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment