mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-26 02:23:43 +03:00
Update webpack to latest beta
This commit is contained in:
parent
546fccb796
commit
f02a23b280
|
@ -9,12 +9,9 @@ const IS_PRODUCTION = process.env.NODE_ENV === "production";
|
||||||
module.exports = {
|
module.exports = {
|
||||||
context: root(),
|
context: root(),
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
debug: false,
|
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.ts', '.js', '.json', '.css'],
|
extensions: ['.ts', '.js', '.json', '.css'],
|
||||||
root: root('lib'),
|
|
||||||
modulesDirectories: ['node_modules'],
|
|
||||||
alias: {
|
alias: {
|
||||||
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
||||||
http: 'stream-http',
|
http: 'stream-http',
|
||||||
|
@ -28,7 +25,7 @@ module.exports = {
|
||||||
node: {
|
node: {
|
||||||
fs: "empty",
|
fs: "empty",
|
||||||
crypto: "empty",
|
crypto: "empty",
|
||||||
global: "window",
|
global: true,
|
||||||
process: true,
|
process: true,
|
||||||
module: false,
|
module: false,
|
||||||
clearImmediate: false,
|
clearImmediate: false,
|
||||||
|
@ -58,29 +55,29 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
preLoaders: [{
|
loaders: [{
|
||||||
|
enforce: 'pre',
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'source-map-loader',
|
loader: 'source-map-loader',
|
||||||
exclude: [
|
exclude: [
|
||||||
/node_modules/
|
/node_modules/
|
||||||
]
|
]
|
||||||
}],
|
}, {
|
||||||
loaders: [{
|
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
loaders: [
|
loaders: [
|
||||||
'awesome-typescript-loader',
|
'awesome-typescript-loader',
|
||||||
'angular2-template-loader'
|
'angular2-template-loader'
|
||||||
],
|
],
|
||||||
exclude: [/\.(spec|e2e)\.ts$/]
|
exclude: [/\.(spec|e2e)\.ts$/]
|
||||||
},{
|
}, {
|
||||||
test: /lib\/.*\.css$/,
|
test: /lib\/.*\.css$/,
|
||||||
loaders: ['raw-loader'],
|
loaders: ['raw-loader'],
|
||||||
exclude: [/redoc-initial-styles\.css$/]
|
exclude: [/redoc-initial-styles\.css$/]
|
||||||
},{
|
}, {
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
loaders: ['style', 'css?-import'],
|
loaders: ['style', 'css?-import'],
|
||||||
exclude: [/lib\/(?!.*redoc-initial-styles).*\.css$/]
|
exclude: [/lib\/(?!.*redoc-initial-styles).*\.css$/]
|
||||||
},{
|
}, {
|
||||||
test: /\.html$/,
|
test: /\.html$/,
|
||||||
loader: 'raw-loader'
|
loader: 'raw-loader'
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -15,9 +15,7 @@ module.exports = {
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.ts', '.js', '.json', '.css'],
|
extensions: ['.ts', '.js', '.json', '.css'],
|
||||||
root: root('lib'),
|
|
||||||
modulesDirectories: ['node_modules'],
|
|
||||||
alias: {
|
alias: {
|
||||||
http: 'stream-http',
|
http: 'stream-http',
|
||||||
https: 'stream-http'
|
https: 'stream-http'
|
||||||
|
@ -30,7 +28,7 @@ module.exports = {
|
||||||
node: {
|
node: {
|
||||||
fs: "empty",
|
fs: "empty",
|
||||||
crypto: "empty",
|
crypto: "empty",
|
||||||
global: "window",
|
global: true,
|
||||||
process: true,
|
process: true,
|
||||||
module: false,
|
module: false,
|
||||||
clearImmediate: false,
|
clearImmediate: false,
|
||||||
|
@ -50,14 +48,14 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
preLoaders: [{
|
loaders: [{
|
||||||
|
enforce: 'pre',
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'source-map-loader',
|
loader: 'source-map-loader',
|
||||||
exclude: [
|
exclude: [
|
||||||
/node_modules/
|
/node_modules/
|
||||||
]
|
]
|
||||||
}],
|
},{
|
||||||
loaders: [{
|
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
loader: 'awesome-typescript-loader',
|
loader: 'awesome-typescript-loader',
|
||||||
exclude: /(node_modules)/
|
exclude: /(node_modules)/
|
||||||
|
|
|
@ -8,9 +8,7 @@ module.exports = {
|
||||||
|
|
||||||
devtool: 'inline-source-map',
|
devtool: 'inline-source-map',
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.ts', '.js', '.json', '.css'],
|
extensions: ['.ts', '.js', '.json', '.css'],
|
||||||
root: root('lib'),
|
|
||||||
modulesDirectories: ['node_modules'],
|
|
||||||
alias: {
|
alias: {
|
||||||
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
||||||
http: 'stream-http',
|
http: 'stream-http',
|
||||||
|
@ -24,7 +22,7 @@ module.exports = {
|
||||||
node: {
|
node: {
|
||||||
fs: "empty",
|
fs: "empty",
|
||||||
crypto: "empty",
|
crypto: "empty",
|
||||||
global: "window",
|
global: true,
|
||||||
process: true,
|
process: true,
|
||||||
module: false,
|
module: false,
|
||||||
clearImmediate: false,
|
clearImmediate: false,
|
||||||
|
@ -39,60 +37,50 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
preLoaders: [{
|
rules: [{
|
||||||
|
enforce: 'pre',
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'source-map-loader',
|
loader: 'source-map-loader',
|
||||||
exclude: [
|
exclude: [
|
||||||
/node_modules/
|
/node_modules/
|
||||||
]
|
]
|
||||||
}],
|
},{
|
||||||
loaders: [ {
|
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
loaders: [
|
loaders: [
|
||||||
'awesome-typescript-loader'
|
'awesome-typescript-loader'
|
||||||
],
|
]
|
||||||
query: {
|
|
||||||
"sourceMap": false,
|
|
||||||
"inlineSourceMap": true,
|
|
||||||
"removeComments": true,
|
|
||||||
"module": "commonjs"
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
loaders: [
|
loaders: [
|
||||||
'angular2-template-loader'
|
'angular2-template-loader'
|
||||||
],
|
],
|
||||||
exclude: [/\.(spec|e2e)\.ts$/]
|
exclude: [/\.(spec|e2e)\.ts$/]
|
||||||
},{
|
}, {
|
||||||
test: /lib\/.*\.css$/,
|
test: /lib\/.*\.css$/,
|
||||||
loaders: ['raw-loader'],
|
loaders: ['raw-loader'],
|
||||||
exclude: [/redoc-initial-styles\.css$/]
|
exclude: [/redoc-initial-styles\.css$/]
|
||||||
},{
|
}, {
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
loaders: ['style', 'css?-import'],
|
loaders: ['style', 'css?-import'],
|
||||||
exclude: [/lib\/(?!.*redoc-initial-styles).*\.css$/]
|
exclude: [/lib\/(?!.*redoc-initial-styles).*\.css$/]
|
||||||
},{
|
}, {
|
||||||
test: /\.html$/,
|
test: /\.html$/,
|
||||||
loader: 'raw-loader'
|
loader: 'raw-loader'
|
||||||
}],
|
}, {
|
||||||
postLoaders: [
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instruments JS files with Istanbul for subsequent code coverage reporting.
|
* Instruments JS files with Istanbul for subsequent code coverage reporting.
|
||||||
* Instrument only testing sources.
|
* Instrument only testing sources.
|
||||||
*
|
*
|
||||||
* See: https://github.com/deepsweet/istanbul-instrumenter-loader
|
* See: https://github.com/deepsweet/istanbul-instrumenter-loader
|
||||||
*/
|
*/
|
||||||
{
|
enforce: 'post',
|
||||||
test: /\.(js|ts)$/, loader: 'istanbul-instrumenter-loader',
|
test: /\.(js|ts)$/, loader: 'istanbul-instrumenter-loader',
|
||||||
include: root('lib'),
|
include: root('lib'),
|
||||||
exclude: [
|
exclude: [
|
||||||
/\.(e2e|spec)\.ts$/,
|
/\.(e2e|spec)\.ts$/,
|
||||||
/node_modules/
|
/node_modules/
|
||||||
]
|
]
|
||||||
}
|
}]
|
||||||
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -100,6 +88,13 @@ module.exports = {
|
||||||
'IS_PRODUCTION': false,
|
'IS_PRODUCTION': false,
|
||||||
'LIB_VERSION': VERSION
|
'LIB_VERSION': VERSION
|
||||||
}),
|
}),
|
||||||
|
new webpack.LoaderOptionsPlugin({
|
||||||
|
test: /\.ts$/,
|
||||||
|
sourceMap: false,
|
||||||
|
inlineSourceMap: true,
|
||||||
|
removeComments: true,
|
||||||
|
module: "commonjs"
|
||||||
|
}),
|
||||||
// ignore changes during tests
|
// ignore changes during tests
|
||||||
new webpack.WatchIgnorePlugin([
|
new webpack.WatchIgnorePlugin([
|
||||||
/\/ReDoc$/i, // ignore change of ReDoc folder itself
|
/\/ReDoc$/i, // ignore change of ReDoc folder itself
|
||||||
|
|
|
@ -80,11 +80,11 @@
|
||||||
"source-map-loader": "^0.1.5",
|
"source-map-loader": "^0.1.5",
|
||||||
"style-loader": "^0.13.1",
|
"style-loader": "^0.13.1",
|
||||||
"ts-helpers": "^1.1.1",
|
"ts-helpers": "^1.1.1",
|
||||||
"tslint": "^3.15.0-dev.0",
|
"tslint": "^3.15.1",
|
||||||
"tslint-stylish": "^2.1.0-beta",
|
"tslint-stylish": "^2.1.0-beta",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.3",
|
||||||
"webpack": "^2.1.0-beta.21",
|
"webpack": "^2.1.0-beta.25",
|
||||||
"webpack-dev-server": "^2.1.0-beta.2"
|
"webpack-dev-server": "^2.1.0-beta.6"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "^2.0.1",
|
"@angular/common": "^2.0.1",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user