Skip to content

Instantly share code, notes, and snippets.

@rafael-metractive
Last active March 15, 2019 22:40
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 rafael-metractive/d6b7f98642da54f8bdedf6f7e03189aa to your computer and use it in GitHub Desktop.
Save rafael-metractive/d6b7f98642da54f8bdedf6f7e03189aa to your computer and use it in GitHub Desktop.
var path = require('path');
const webpack = require('webpack');
module.exports = {
mode: "development",
entry: './src/index.js',
watch: true,
output: {
path: '/xampp7/htdocs/metractive/tagse-frontend/public',
filename: 'bundle.js',
devtoolLineToLine: true
},
devServer: {
inline: true,
contentBase: '/xampp7/htdocs/metractive/tagse-frontend/public',
port: 1010,
historyApiFallback: true,
hot: true,
host: '0.0.0.0'
},
resolve: {
extensions: ['.js', '.jsx', '.css'],
modules: [
path.resolve('./src'),
path.resolve('./node_modules')
]
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
},
{
test: /\.css$/,
use: ['style-loader', 'postcss-loader']
},
{
test: /\.(jpg|png|svg)$/,
use: {
loader: "url-loader",
options: {
limit: 25000
}
},
}
]
},
plugins: [
new webpack.DefinePlugin({
'process.env.FIREBASE_API_KEY': JSON.stringify("AIzaSyBI1pVh-3EUUmTtyoZdbrjc7msAu5lr1TQ")
})
],
performance: {
hints: false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment