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
import React from 'react' | |
// dead code - useless imports | |
import ComponentA from 'common/components/ComponentA' | |
import ComponentB from 'common/components/ComponentB' | |
import ComponentC from 'common/components/ComponentC' | |
import SomeWrapper from 'common/components/SomeWrapper' | |
// dead code - unused constant declaration | |
const MAPPER = { | |
TYPE_A: ComponentA, |
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
import React from 'react' | |
// dead code - useless imports | |
import ComponentA from 'common/components/ComponentA' | |
import ComponentB from 'common/components/ComponentB' | |
import ComponentC from 'common/components/ComponentC' | |
import SomeWrapper from 'common/components/SomeWrapper' | |
// dead code - unused constant declaration | |
const MAPPER = { | |
TYPE_A: ComponentA, |
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
import React from 'react' | |
// dead code - useless imports | |
import ComponentA from 'common/components/ComponentA' | |
import ComponentB from 'common/components/ComponentB' | |
import ComponentC from 'common/components/ComponentC' | |
import SomeWrapper from 'common/components/SomeWrapper' | |
export const SomeComponent = ({ type }) => { | |
return null | |
} |
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
export const SomeComponent = ({ type }) => { | |
return null | |
} |
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
const { minify } = require('terser') | |
module.exports = function modifyModuleSourceLoader (source, map, meta) { | |
const callback = this.async() | |
const { terserOptions } = this.getOptions() | |
minify(source, terserOptions) | |
.then(data => { | |
const { code } = data || {} | |
callback(null, code, map, meta) | |
}) |
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
{ | |
"toplevel": true, | |
"ecma": 8, | |
"compress": { | |
"pure_funcs": [ | |
"console.log", | |
"console.warn" | |
], | |
"toplevel": true, | |
"hoist_props": false |
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
{ | |
"toplevel": true, | |
"ecma": 8, | |
"compress": { | |
"global_defs": { | |
"__MOBILE__": true | |
}, | |
"pure_funcs": [ | |
"console.log", |
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
import Mobile from './mobile' | |
import Desktop from './desktop' | |
export default () => __MOBILE__ ? <Mobile /> : <Desktop /> |
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
import Mobile from './mobile' | |
export default () => <Mobile /> |
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
import Desktop from './desktop' | |
export default () => <Desktop /> |
OlderNewer