webpack - move __dirname-config up into shared config
This commit is contained in:
parent
195ef80610
commit
f82bcb20ed
|
@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||
mainFields: ['module', 'main'],
|
||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||
},
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
output: {
|
||||
filename: 'cssMain.js',
|
||||
path: path.join(__dirname, 'client', 'dist'),
|
||||
|
|
|
@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||
mainFields: ['module', 'main'],
|
||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||
},
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
output: {
|
||||
filename: 'cssServerMain.js',
|
||||
path: path.join(__dirname, 'dist'),
|
||||
|
|
|
@ -11,9 +11,6 @@ const withDefaults = require('../shared.webpack.config');
|
|||
|
||||
module.exports = withDefaults({
|
||||
context: __dirname,
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
entry: {
|
||||
main: './src/main.ts',
|
||||
['askpass-main']: './src/askpass-main.ts'
|
||||
|
|
|
@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||
mainFields: ['module', 'main'],
|
||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||
},
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
output: {
|
||||
filename: 'htmlMain.js',
|
||||
path: path.join(__dirname, 'client', 'dist'),
|
||||
|
|
|
@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||
mainFields: ['module', 'main'],
|
||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||
},
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
output: {
|
||||
filename: 'htmlServerMain.js',
|
||||
path: path.join(__dirname, 'dist'),
|
||||
|
|
|
@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||
mainFields: ['module', 'main'],
|
||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||
},
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
output: {
|
||||
filename: 'jsonMain.js',
|
||||
path: path.join(__dirname, 'client', 'dist'),
|
||||
|
|
|
@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||
mainFields: ['module', 'main'],
|
||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||
},
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
output: {
|
||||
filename: 'jsonServerMain.js',
|
||||
path: path.join(__dirname, 'dist'),
|
||||
|
|
|
@ -19,6 +19,9 @@ module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
|
|||
let defaultConfig = {
|
||||
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
|
||||
target: 'node', // extensions run in a node context
|
||||
node: {
|
||||
__dirname: false // leave the __dirname-behaviour intact
|
||||
},
|
||||
resolve: {
|
||||
mainFields: ['main'], // prefer the main-entry of package.json files
|
||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||
|
|
|
@ -11,9 +11,6 @@ const withDefaults = require('../shared.webpack.config');
|
|||
|
||||
module.exports = withDefaults({
|
||||
context: __dirname,
|
||||
node: {
|
||||
__dirname: false,
|
||||
},
|
||||
resolve: {
|
||||
mainFields: ['module', 'main']
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue