Update build
This commit is contained in:
parent
34f9e69bff
commit
e7641e38d8
463
js/package-lock.json
generated
463
js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const flatten = require('lodash.flatten');
|
||||
// const ReactIntlAggregatePlugin = require('react-intl-aggregate-webpack-plugin');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const WebpackErrorNotificationPlugin = require('webpack-error-notification');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
@ -83,8 +84,9 @@ module.exports = {
|
||||
{
|
||||
test: /\.css$/,
|
||||
include: /semantic-ui-css/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: 'style-loader',
|
||||
use: [
|
||||
'style-loader',
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
@ -92,12 +94,14 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
exclude: /semantic-ui-css/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: 'style-loader',
|
||||
use: [
|
||||
'style-loader',
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
@ -119,14 +123,17 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|svg|woff|woff2|ttf|eot|otf)(\?.*)?$/,
|
||||
use: {
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[hash:base64:10].[ext]',
|
||||
useRelativePath: true
|
||||
name: '[name].[hash:10].[ext]',
|
||||
outputPath: '',
|
||||
publicPath: '',
|
||||
useRelativePath: false
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -153,7 +160,10 @@ module.exports = {
|
||||
|
||||
plugins: (function () {
|
||||
let plugins = Shared.getPlugins().concat(
|
||||
new WebpackErrorNotificationPlugin()
|
||||
new WebpackErrorNotificationPlugin(),
|
||||
new ExtractTextPlugin({
|
||||
filename: `${isEmbed ? 'embed' : 'bundle'}.css`
|
||||
}),
|
||||
);
|
||||
|
||||
if (!isEmbed) {
|
||||
@ -187,16 +197,13 @@ module.exports = {
|
||||
? dapp.id
|
||||
: Api.util.sha3(dapp.url);
|
||||
|
||||
return [
|
||||
{
|
||||
return ['index.html', 'dist.css', 'dist.css.map', 'dist.js', 'dist.js.map'].map((file) => ({
|
||||
from: path.join(dir, file),
|
||||
to: `dapps/${destination}/`
|
||||
})).concat({
|
||||
from: path.join(dir, 'dist'),
|
||||
to: `dapps/${destination}/dist/`
|
||||
},
|
||||
{
|
||||
from: path.join(dir, 'index.html'),
|
||||
to: `dapps/${destination}/`
|
||||
}
|
||||
];
|
||||
});
|
||||
})
|
||||
.filter((copy) => copy)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user