Last active
May 17, 2022 16:55
-
-
Save KleeUT/d82e2ec63a1b9a006ae6 to your computer and use it in GitHub Desktop.
Webpack test config file
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 webpack = require('webpack'); | |
module.exports = { | |
entry: [ | |
"mocha\!./client/test/test.js" // The mocha loader command pointing to the test root. Note the ! is escaped. | |
], | |
output: { | |
path: __dirname + '/client/test/', // Path to where I want testBundle.js to be put | |
filename: "testBundle.js" | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.jsx$/, loaders: ['jsx-loader'], exclude: /node_modules/}, | |
{ test: /\.js?$/, loaders: ['babel'], exclude: /node_modules/ }, | |
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}, | |
{ test: /\.css$/, loader: "style!css" }, | |
{ test: /\.woff$/, loader: "url-loader?limit=10000&minetype=application/font-woff" }, | |
{ test: /\.woff2$/, loader: "url-loader?limit=10000&minetype=application/font-woff" }, | |
{ test: /\.ttf$/, loader: "file-loader" }, | |
{ test: /\.eot$/, loader: "file-loader" }, | |
{ test: /\.svg$/, loader: "file-loader" }, | |
{ test: /\.ico$/, loader: "file-loader" } | |
] | |
}, | |
plugins: [ | |
new webpack.NoErrorsPlugin() | |
], | |
externals:{ // Code loaded from cdn | |
"google":"google", | |
"io":"io", | |
"React":"React", | |
"ReactDom":"ReactDom" | |
} | |
}; |
Did we get a resolution on this?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you ever figure this out?