mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* bump to 1.7 * add test for importType and modulesFromFile * fix header url * fix missing semicolon & non-arrow function * replace literal with interface * fix missing semicolons
72 lines
1.5 KiB
TypeScript
72 lines
1.5 KiB
TypeScript
import webpack = require('webpack');
|
|
import webpackNodeExternals = require('webpack-node-externals');
|
|
|
|
const a: webpack.Configuration = {
|
|
entry: 'test.js',
|
|
externals: [
|
|
webpackNodeExternals()
|
|
]
|
|
};
|
|
const b: webpack.Configuration = {
|
|
entry: 'test.js',
|
|
externals: webpackNodeExternals()
|
|
};
|
|
const c: webpack.Configuration = {
|
|
entry: 'test.js',
|
|
externals: [
|
|
webpackNodeExternals({
|
|
whitelist: ['jquery', 'webpack/hot/dev-server', /^lodash/]
|
|
})
|
|
]
|
|
};
|
|
const d: webpack.Configuration = {
|
|
entry: 'test.js',
|
|
externals: [
|
|
webpackNodeExternals({
|
|
importType: (moduleName) => {
|
|
return 'commonjs';
|
|
}
|
|
})
|
|
]
|
|
};
|
|
const e: webpack.Configuration = {
|
|
entry: 'test.js',
|
|
externals: [
|
|
webpackNodeExternals({
|
|
modulesFromFile: {
|
|
exclude: 'devDependencies'
|
|
}
|
|
})
|
|
]
|
|
};
|
|
const f: webpack.Configuration = {
|
|
entry: 'test.js',
|
|
externals: [
|
|
webpackNodeExternals({
|
|
modulesFromFile: {
|
|
exclude: ['devDependencies']
|
|
}
|
|
})
|
|
]
|
|
};
|
|
const g: webpack.Configuration = {
|
|
entry: 'test.js',
|
|
externals: [
|
|
webpackNodeExternals({
|
|
modulesFromFile: {
|
|
include: 'dependencies'
|
|
}
|
|
})
|
|
]
|
|
};
|
|
const h: webpack.Configuration = {
|
|
entry: 'test.js',
|
|
externals: [
|
|
webpackNodeExternals({
|
|
modulesFromFile: {
|
|
include: ['dependencies']
|
|
}
|
|
})
|
|
]
|
|
};
|