1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- const path = require('path');
- const webpack = require('webpack');
- const staticPath = path.resolve(__dirname, '..', 'src', 'sentry', 'static', 'sentry');
- const componentPath = path.resolve(staticPath, 'app', 'components');
- const sentryConfig = require('../webpack.config');
- const appConfig = sentryConfig[0];
- const legacyCssConfig = sentryConfig[1];
- module.exports = {
- module: {
- rules: [
- {
- test: /\.po$/,
- loader: 'po-catalog-loader',
- query: {
- referenceExtensions: ['.js', '.jsx'],
- domain: 'sentry'
- }
- },
- {
- test: /\.css$/,
- use: ['style-loader', 'css-loader']
- },
- {
- test: /\.less$/,
- use: [
- {
- loader: 'style-loader'
- },
- {
- loader: 'css-loader'
- },
- {
- loader: 'less-loader'
- }
- ]
- },
- {
- test: /\.(woff|woff2|ttf|eot|svg|png|gif|ico|jpg)($|\?)/,
- loader: 'file-loader?name=' + '[name].[ext]'
- }
- ]
- },
- plugins: [
- new webpack.ProvidePlugin({
- $: 'jquery',
- jQuery: 'jquery',
- 'window.jQuery': 'jquery',
- 'root.jQuery': 'jquery',
- Raven: 'raven-js',
- underscore: 'underscore',
- _: 'underscore'
- })
- ],
- resolve: {
- alias: Object.assign({}, appConfig.resolve.alias, {
- 'sentry-ui': componentPath
- })
- }
- };
|