mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
webpack - move __dirname-config up into shared config
This commit is contained in:
@@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||||||
mainFields: ['module', 'main'],
|
mainFields: ['module', 'main'],
|
||||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||||
},
|
},
|
||||||
node: {
|
|
||||||
__dirname: false // leave the __dirname-behaviour intact
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
filename: 'cssMain.js',
|
filename: 'cssMain.js',
|
||||||
path: path.join(__dirname, 'client', 'dist'),
|
path: path.join(__dirname, 'client', 'dist'),
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||||||
mainFields: ['module', 'main'],
|
mainFields: ['module', 'main'],
|
||||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||||
},
|
},
|
||||||
node: {
|
|
||||||
__dirname: false // leave the __dirname-behaviour intact
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
filename: 'cssServerMain.js',
|
filename: 'cssServerMain.js',
|
||||||
path: path.join(__dirname, 'dist'),
|
path: path.join(__dirname, 'dist'),
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ const withDefaults = require('../shared.webpack.config');
|
|||||||
|
|
||||||
module.exports = withDefaults({
|
module.exports = withDefaults({
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
node: {
|
|
||||||
__dirname: false // leave the __dirname-behaviour intact
|
|
||||||
},
|
|
||||||
entry: {
|
entry: {
|
||||||
main: './src/main.ts',
|
main: './src/main.ts',
|
||||||
['askpass-main']: './src/askpass-main.ts'
|
['askpass-main']: './src/askpass-main.ts'
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||||||
mainFields: ['module', 'main'],
|
mainFields: ['module', 'main'],
|
||||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||||
},
|
},
|
||||||
node: {
|
|
||||||
__dirname: false // leave the __dirname-behaviour intact
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
filename: 'htmlMain.js',
|
filename: 'htmlMain.js',
|
||||||
path: path.join(__dirname, 'client', 'dist'),
|
path: path.join(__dirname, 'client', 'dist'),
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||||||
mainFields: ['module', 'main'],
|
mainFields: ['module', 'main'],
|
||||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||||
},
|
},
|
||||||
node: {
|
|
||||||
__dirname: false // leave the __dirname-behaviour intact
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
filename: 'htmlServerMain.js',
|
filename: 'htmlServerMain.js',
|
||||||
path: path.join(__dirname, 'dist'),
|
path: path.join(__dirname, 'dist'),
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||||||
mainFields: ['module', 'main'],
|
mainFields: ['module', 'main'],
|
||||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||||
},
|
},
|
||||||
node: {
|
|
||||||
__dirname: false // leave the __dirname-behaviour intact
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
filename: 'jsonMain.js',
|
filename: 'jsonMain.js',
|
||||||
path: path.join(__dirname, 'client', 'dist'),
|
path: path.join(__dirname, 'client', 'dist'),
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ module.exports = withDefaults({
|
|||||||
mainFields: ['module', 'main'],
|
mainFields: ['module', 'main'],
|
||||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||||
},
|
},
|
||||||
node: {
|
|
||||||
__dirname: false // leave the __dirname-behaviour intact
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
filename: 'jsonServerMain.js',
|
filename: 'jsonServerMain.js',
|
||||||
path: path.join(__dirname, 'dist'),
|
path: path.join(__dirname, 'dist'),
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
|
|||||||
let defaultConfig = {
|
let defaultConfig = {
|
||||||
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
|
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
|
target: 'node', // extensions run in a node context
|
||||||
|
node: {
|
||||||
|
__dirname: false // leave the __dirname-behaviour intact
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
mainFields: ['main'], // prefer the main-entry of package.json files
|
mainFields: ['main'], // prefer the main-entry of package.json files
|
||||||
extensions: ['.ts', '.js'] // support ts-files and js-files
|
extensions: ['.ts', '.js'] // support ts-files and js-files
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ const withDefaults = require('../shared.webpack.config');
|
|||||||
|
|
||||||
module.exports = withDefaults({
|
module.exports = withDefaults({
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
node: {
|
|
||||||
__dirname: false,
|
|
||||||
},
|
|
||||||
resolve: {
|
resolve: {
|
||||||
mainFields: ['module', 'main']
|
mainFields: ['module', 'main']
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user