Created
May 16, 2018 21:30
-
-
Save gpolyn/59bbc15fb9a9c9fbd49b32cfa49c52aa to your computer and use it in GitHub Desktop.
next, web worker debug issue
This file contains hidden or 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
Show hidden characters
{ | |
"presets": [ | |
[ | |
"next/babel", | |
{ | |
"styled-jsx": { | |
"plugins": [ | |
"styled-jsx-plugin-postcss" | |
] | |
} | |
} | |
] | |
], | |
"plugins": [ | |
[ | |
"transform-assets", | |
{ | |
"extensions": ["txt", "svg", "png", "jpg"], | |
"regExp": ".*/static/(.+)", | |
"name": "/static/[1]?[sha512:hash:base64:7]" | |
} | |
], | |
[ | |
"inline-import", | |
{ | |
"extensions": [".css"] | |
} | |
], | |
[ | |
"styled-components", | |
{ | |
"ssr": true, | |
"displayName": false | |
} | |
] | |
] | |
} |
This file contains hidden or 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 { WebpackBundleSizeAnalyzerPlugin } = require('webpack-bundle-size-analyzer') | |
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') | |
const { ANALYZE } = process.env | |
module.exports = { | |
webpack: function (cfg, {isServer}) { | |
const originalEntry = cfg.entry | |
cfg.entry = async () => { | |
const entries = await originalEntry() | |
if (entries['main.js']) { | |
entries['main.js'].unshift('./client/polyfills.js') | |
} | |
return entries | |
} | |
if (ANALYZE) { | |
cfg.plugins.push( | |
new WebpackBundleSizeAnalyzerPlugin('stats.txt') | |
) | |
cfg.plugins.push(new BundleAnalyzerPlugin({ | |
analyzerMode: 'server', | |
analyzerPort: isServer ? 8888 : 8889, | |
openAnalyzer: true | |
})) | |
} | |
// not for workerize-loader | |
cfg.module.rules.push({ | |
test: /\.worker\.js$/, | |
loader: ['worker-loader'] | |
}) | |
return cfg | |
} | |
} |
This file contains hidden or 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
{ | |
"name": "wanted-buyer-preview", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"dev": "next", | |
"build": "next build", | |
"start": "next start", | |
"analyze": "ANALYZE=1 next build && cat .next/stats.txt" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"@react-mdc/button": "0.1.8", | |
"@react-mdc/card": "0.1.9", | |
"@react-mdc/checkbox": "0.1.12", | |
"@react-mdc/elevation": "0.1.9", | |
"@react-mdc/fab": "0.1.9", | |
"@react-mdc/layout-grid": "0.1.9", | |
"@react-mdc/typography": "0.1.8", | |
"@turf/difference": "5.1.5", | |
"@turf/helpers": "6.1.3", | |
"@turf/intersect": "6.1.2", | |
"@turf/line-to-polygon": "6.0.1", | |
"@turf/union": "6.0.2", | |
"@zeit/next-bundle-analyzer": "0.1.1", | |
"auth0-js": "9.2.2", | |
"auth0-lock": "11.5.2", | |
"babel-plugin-inline-import": "2.0.6", | |
"babel-plugin-styled-components": "1.5.0", | |
"babel-plugin-transform-assets": "0.2.0", | |
"babel-preset-env": "1.6.1", | |
"babel-preset-es2015": "6.24.1", | |
"babel-preset-stage-0": "6.24.1", | |
"clooneyjs": "0.6.4", | |
"cookie-session": "2.0.0-beta.3", | |
"es6-promise": "4.2.4", | |
"express": "4.16.2", | |
"google-map-react": "0.34.0", | |
"immutability-helper": "2.6.6", | |
"isomorphic-unfetch": "2.0.0", | |
"js-cookie": "2.2.0", | |
"jsonwebtoken": "8.1.1", | |
"jwt-decode": "2.2.0", | |
"localforage": "1.7.1", | |
"lodash.throttle": "4.1.1", | |
"logrocket": "0.6.10", | |
"lost": "8.2.1", | |
"material-components-web": "0.29.0", | |
"next": "6.0.2", | |
"next-redux-wrapper": "1.3.5", | |
"postcss-nested": "3.0.0", | |
"promise-worker": "1.1.1", | |
"prop-types": "15.6.0", | |
"raf": "3.4.0", | |
"react": "16.2.0", | |
"react-dom": "16.2.0", | |
"react-measure": "2.0.2", | |
"react-no-ssr": "1.1.0", | |
"react-redux": "5.0.6", | |
"react-transition-group": "2.2.1", | |
"redux": "3.7.2", | |
"redux-actions": "2.2.1", | |
"redux-cookie": "0.5.9", | |
"redux-devtools-extension": "2.13.2", | |
"redux-logger": "3.0.6", | |
"redux-observable": "0.18.0", | |
"redux-persist": "5.9.1", | |
"reselect": "3.0.1", | |
"rxjs": "5.5.6", | |
"styled-components": "3.1.6", | |
"styled-jsx-plugin-postcss": "0.1.2", | |
"superagent": "3.8.2", | |
"transform-runtime": "0.0.0", | |
"universal-rx-request": "1.0.3", | |
"uuid": "3.2.1", | |
"webpack-bundle-analyzer": "2.11.1", | |
"webpack-bundle-size-analyzer": "2.7.0", | |
"worker-loader": "1.1.1", | |
"workerize-loader": "1.0.2", | |
"workerpool": "2.3.0" | |
}, | |
"postcss": { | |
"plugins": { | |
"lost": {}, | |
"postcss-nested": {} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment