Skip to content

Commit

Permalink
Add fonts (eot, ttf, woff) as list of items that can embedded
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Chen committed Jun 5, 2018
1 parent 386036b commit db9c92e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
14 changes: 11 additions & 3 deletions packages/salesforcedx-webview-ui/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.
devtool: 'cheap-module-source-map',
entry: paths.webpackEntriesDevFn ,
entry: paths.webpackEntriesDevFn,
output: {
// Add /* filename */ comments to generated require()s in the output.
pathinfo: true,
Expand Down Expand Up @@ -122,10 +122,18 @@ module.exports = {
// smaller than specified limit in bytes as data URLs to avoid requests.
// A missing `test` is equivalent to a match.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
test: [
/\.bmp$/,
/\.gif$/,
/\.jpe?g$/,
/\.png$/,
/\.eot$/,
/\.ttf$/,
/\.woff$/
],
loader: require.resolve('url-loader'),
options: {
limit: 10000,
limit: 100000,
name: 'media/[name].[ext]'
}
},
Expand Down
12 changes: 10 additions & 2 deletions packages/salesforcedx-webview-ui/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,18 @@ module.exports = {
// "url" loader works just like "file" loader but it also embeds
// assets smaller than specified size as data URLs to avoid requests.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
test: [
/\.bmp$/,
/\.gif$/,
/\.jpe?g$/,
/\.png$/,
/\.eot$/,
/\.ttf$/,
/\.woff$/
],
loader: require.resolve('url-loader'),
options: {
limit: 10000,
limit: 100000,
name: 'media/[name].[ext]'
}
},
Expand Down

0 comments on commit db9c92e

Please sign in to comment.