mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-13 14:26:50 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
740be03b8e
2
.gitignore
vendored
2
.gitignore
vendored
@ -36,5 +36,5 @@ Thumbs.db
|
||||
node_modules/
|
||||
runtime/init.lock
|
||||
runtime/log
|
||||
./prd/
|
||||
prd/
|
||||
dev/
|
||||
|
@ -1 +0,0 @@
|
||||
window.WEBPACK_ASSETS = {"index.js":{"js":"index.js","css":"index.css"}}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
14
ykit.js
14
ykit.js
@ -26,12 +26,9 @@ module.exports = {
|
||||
|
||||
baseConfig.devtool = 'cheap-module-eval-source-map'
|
||||
baseConfig.context = path.resolve(__dirname, "client");
|
||||
|
||||
baseConfig.output.prd.path = 'static/prd';
|
||||
baseConfig.output.prd.publicPath = '';
|
||||
baseConfig.output.prd.filename = '[name][ext]'
|
||||
baseConfig.plugins.push(assetsPluginInstance)
|
||||
|
||||
baseConfig.output.prd.filename = '[name]@[chunkhash][ext]'
|
||||
baseConfig.module.loaders.push({
|
||||
test: /\.(sass|scss)$/,
|
||||
loader: ykit.ExtractTextPlugin.extract(
|
||||
@ -41,11 +38,14 @@ module.exports = {
|
||||
)
|
||||
})
|
||||
baseConfig.module.preLoaders.push({
|
||||
test: /\.(js|jsx)$/,
|
||||
exclude: /node_modules/,
|
||||
loader: "eslint-loader"
|
||||
test: /\.(js|jsx)$/,
|
||||
exclude: /node_modules/,
|
||||
loader: "eslint-loader"
|
||||
});
|
||||
|
||||
if (this.env == 'prd') {
|
||||
baseConfig.plugins.push(assetsPluginInstance)
|
||||
}
|
||||
return baseConfig;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user