Skip to content

Commit

Permalink
Fix production config
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Aug 2, 2018
1 parent 8eee058 commit 6dd8b19
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/content-script/renderer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { debounce } from 'lodash'
import * as debounce from 'lodash/debounce'
import { LineAndCharacter } from 'typescript'
import { renderToDOM } from './containers'
import {
Expand Down Expand Up @@ -150,7 +150,7 @@ export default class Renderer {
definition: {
isVisible: true,
height: this.line.height,
width: this.line.width - 10, // TODO: Magic number
width: this.line.width - 20, // TODO: Magic number
top: response.info.line * this.line.height,
},
})
Expand Down
32 changes: 17 additions & 15 deletions webpack.config.production.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ module.exports = {
...config,
mode: 'production',
devtool: false,
plugins: [
...config.plugins,
new UglifyJsPlugin({
uglifyOptions: {
compress: {
drop_console: true,
optimization: {
noEmitOnErrors: false,
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
compress: {
drop_console: true,
},
output: {
// Fix Safari error:
// SyntaxError: Invalid regular expression: missing terminating ] for character class
ascii_only: process.env.TARGET === 'safari',
},
},
output: {
// Fix Safari error:
// SyntaxError: Invalid regular expression: missing terminating ] for character class
ascii_only: process.env.TARGET === 'safari',
},
},
}),
new BundleAnalyzerPlugin(),
],
}),
],
},
plugins: [...config.plugins, new BundleAnalyzerPlugin()],
}

0 comments on commit 6dd8b19

Please sign in to comment.