Skip to content

Instantly share code, notes, and snippets.

@gunta
Created June 26, 2014 04:33
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 gunta/9297b96d463801f876ea to your computer and use it in GitHub Desktop.
Save gunta/9297b96d463801f876ea to your computer and use it in GitHub Desktop.
Webpack test
module.exports = {
entry: './main.js',
output: {
filename: 'bundle.js'
},
module: {
loaders: [
// 拡張子がCSSの場合はCSSのLoaderを採用
{ test: /\.css$/, loader: 'style!css' },
// bootstrap.cssの中に使うWebFontを(デフォルトで)base64エンコードされます
{ test: /\.svg$/, loader: 'url-loader?mimetype=image/svg+xml' },
{ test: /\.woff$/, loader: 'url-loader?mimetype=application/font-woff' },
{ test: /\.eot$/, loader: 'url-loader?mimetype=application/font-woff' },
{ test: /\.ttf$/, loader: 'url-loader?mimetype=application/font-woff' }
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment