Commit 79f261c5 by Johannes Edmeier

Less global provides

parent 4329ed8d
...@@ -77,41 +77,43 @@ module.exports = { ...@@ -77,41 +77,43 @@ module.exports = {
test: /\.js$/, test: /\.js$/,
loader: 'eslint', loader: 'eslint',
exclude: [/node_modules/, /third-party/], exclude: [/node_modules/, /third-party/],
}], }],
loaders: [{ loaders: [
test: /\.js$/, {
exclude: [/node_modules/, /third-party/], test: /^jolokia$/,
loader: 'ng-annotate' loader: "imports?$=jquery"
}, {
test: /\.tpl\.html$/,
loader: 'raw'
}, {
test: /\.css(\?.*)?$/,
loader: ExtractTextPlugin.extract('style', 'css?-minimize')
}, { }, {
test: /\.(jpg|png|gif|eot|svg|ttf|woff(2)?)(\?.*)?$/, test: /\.js$/,
include: /\/(third-party|node_modules)\//, exclude: [/node_modules/, /third-party/],
loader: 'file', loader: 'ng-annotate'
query: {
name: 'third-party/[2]',
regExp: '(third-party|node_modules)/(.+)'
}
}, { }, {
test: /\.(jpg|png|gif)$/, test: /\.tpl\.html$/,
include: /\/(core|modules)\//, loader: 'raw'
loader: 'file', }, {
query: { test: /\.css(\?.*)?$/,
name: '[2]', loader: ExtractTextPlugin.extract('style', 'css?-minimize')
regExp: '(core|modules)/(.+)$' }, {
} test: /\.(jpg|png|gif|eot|svg|ttf|woff(2)?)(\?.*)?$/,
include: /\/(third-party|node_modules)\//,
loader: 'file',
query: {
name: 'third-party/[2]',
regExp: '(third-party|node_modules)/(.+)'
}
}, {
test: /\.(jpg|png|gif)$/,
include: /\/(core|modules)\//,
loader: 'file',
query: {
name: '[2]',
regExp: '(core|modules)/(.+)$'
}
}] }]
}, },
plugins: [ plugins: [
new CleanWebpackPlugin([DIST]), new CleanWebpackPlugin([DIST]),
new ExtractTextPlugin('[name].css'), new ExtractTextPlugin('[name].css'),
new Webpack.ProvidePlugin({ new Webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery' 'window.jQuery': 'jquery'
}), }),
new NgAnnotatePlugin({ new NgAnnotatePlugin({
...@@ -124,13 +126,14 @@ module.exports = { ...@@ -124,13 +126,14 @@ module.exports = {
new CopyWebpackPlugin([{ new CopyWebpackPlugin([{
from: '**/*.html', from: '**/*.html',
context: 'core/' context: 'core/'
}, { }, {
from: '**/*.html', from: '**/*.html',
context: 'modules/' context: 'modules/'
}], { }], {
ignore: ['*.tpl.html'] ignore: ['*.tpl.html']
}) })
].concat(!isDevServer ? [] : new ModuleConcatPlugin([{ ].concat(!isDevServer ? [] : new ModuleConcatPlugin([
{
filename: 'all-modules.js', filename: 'all-modules.js',
test: /module\.js/, test: /module\.js/,
delimiter: ';\n' delimiter: ';\n'
...@@ -138,8 +141,8 @@ module.exports = { ...@@ -138,8 +141,8 @@ module.exports = {
filename: 'all-modules.css', filename: 'all-modules.css',
test: /module\.css/, test: /module\.css/,
delimiter: '\n' delimiter: '\n'
} }
])), ])),
devServer: { devServer: {
proxy: { proxy: {
'/api*': { '/api*': {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment