Commit c1344777 authored by 邓晓峰's avatar 邓晓峰

feat: webpack bug

parent 7dbe9603
......@@ -115,6 +115,8 @@ module.exports = options => ({
options: {
// Inline files smaller than 10 kB
limit: 10 * 1024,
outputPath: 'assets/',
name: '[name].[ext]'
},
},
// {
......
......@@ -17,9 +17,10 @@ module.exports = require('./webpack.base.babel')({
],
// Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
//[chunkhash:8] [chunkhash:8]
output: {
filename: 'static/[name].[chunkhash:8].js',
chunkFilename: 'static/[name].[chunkhash:8].chunk.js',
filename: 'static/[name].js',
chunkFilename: 'static/[name].chunk.js',
},
optimization: {
......
......@@ -18,7 +18,6 @@
"analyze": "node ./internals/scripts/analyze.js",
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"preinstall": "npm run npmcheckversion",
"build": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout",
"build:inspect": "cross-env NODE_ENV=production node --inspect-brk ./node_modules/webpack/bin/webpack.js --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout",
"build:clean": "node ./internals/webpack/clean.js",
......
......@@ -8,21 +8,22 @@ import 'sanitize.css/sanitize.css';
import React from 'react';
import ReactDOM from 'react-dom';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale/zh_CN';
import { ConnectedRouter } from 'connected-react-router/immutable';
import Immutable from 'immutable';
import { Provider } from 'react-redux';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale/zh_CN';
import { PictureWallProvider } from '@/components/Upload/context';
import configureStore from './configureStore';
import App from './containers/App';
import history from './utils/history';
import config from './routes/config';
import { PictureWallProvider } from '@/components/Upload/context';
import history from './utils/history';
const initialState = Immutable.Map();
const store = configureStore(initialState, history);
const MOUNT_NODE = document.getElementById('app');
const render = () => {
ReactDOM.render(
<Provider store={store}>
......
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