Created
August 10, 2017 07:55
-
-
Save comfortablejohn/ff78a69f6caae441facc46d059fc49e0 to your computer and use it in GitHub Desktop.
Webpack Config for Preact (JSX)
This file contains hidden or 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
module.exports = { | |
entry: './src/js/index.js', | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'app.bundle.js', | |
}, | |
devtool: 'source-map', | |
module: { | |
rules: [{ | |
test: /\.js$/, | |
include: [ | |
path.resolve(__dirname, 'src/js/') | |
], | |
exclude: /node_modules/, | |
use: { | |
loader: 'babel-loader', | |
options: { | |
presets: ['env'], | |
plugins: [["transform-react-jsx", { "pragma": "h" }]] | |
} | |
} | |
}] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment