Skip to content

Instantly share code, notes, and snippets.

@ludekstepan
Last active October 6, 2018 07:46
Show Gist options
  • Save ludekstepan/368d5f56afc195e473a6a9d897a5e164 to your computer and use it in GitHub Desktop.
Save ludekstepan/368d5f56afc195e473a6a9d897a5e164 to your computer and use it in GitHub Desktop.
import { getHello } from './some-dep'
console.log(getHello())
{
"name": "webpack-bailout",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-cli"
},
"author": "",
"license": "ISC",
"devDependencies": {
"webpack": "4.20.2",
"webpack-cli": "3.1.2"
},
"dependencies": {}
}
export function getDir() {
// Change __dirname to __foo to make ModuleConcatenationPlugin work.
return __dirname
}
export function getHello() {
return 'hello'
}
module.exports = {
mode: 'production',
target: 'web',
entry: './index.js',
stats: {
optimizationBailout: true
},
optimization: {
minimize: false,
namedModules: true,
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment