mirror of
https://github.com/liriliri/eruda.git
synced 2026-02-02 09:49:00 +08:00
chore: separate polyfill
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
const BundleAnalyzerPlugin =
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
||||||
require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
.BundleAnalyzerPlugin
|
||||||
|
|
||||||
exports = require('./webpack.prod')
|
exports = require('./webpack.prod')
|
||||||
|
|
||||||
|
|||||||
10
build/webpack.polyfill.js
Normal file
10
build/webpack.polyfill.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
const path = require('path')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
mode: 'production',
|
||||||
|
entry: './src/polyfill',
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, '../dist'),
|
||||||
|
filename: 'eruda-polyfill.js',
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ci": "npm run lint && npm run test && npm run build && npm run es5",
|
"ci": "npm run lint && npm run test && npm run build && npm run es5",
|
||||||
"build": "lsla shx rm -rf dist && webpack --config build/webpack.prod.js && node build/build && lsla shx cp README.md eruda.d.ts dist",
|
"build": "lsla shx rm -rf dist && webpack --config build/webpack.prod.js && webpack --config build/webpack.polyfill.js && node build/build && lsla shx cp README.md eruda.d.ts dist",
|
||||||
"build:analyser": "webpack --config build/webpack.analyser.js",
|
"build:analyser": "webpack --config build/webpack.analyser.js",
|
||||||
"dev": "webpack-dev-server --config build/webpack.dev.js --host 0.0.0.0",
|
"dev": "webpack-dev-server --config build/webpack.dev.js --host 0.0.0.0",
|
||||||
"test": "karma start",
|
"test": "karma start",
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import 'core-js/modules/es.map'
|
|
||||||
import 'core-js/stable/promise'
|
|
||||||
import EntryBtn from './EntryBtn/EntryBtn'
|
import EntryBtn from './EntryBtn/EntryBtn'
|
||||||
import DevTools from './DevTools/DevTools'
|
import DevTools from './DevTools/DevTools'
|
||||||
import Tool from './DevTools/Tool'
|
import Tool from './DevTools/Tool'
|
||||||
|
|||||||
2
src/polyfill.js
Normal file
2
src/polyfill.js
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
import 'core-js/modules/es.map'
|
||||||
|
import 'core-js/stable/promise'
|
||||||
Reference in New Issue
Block a user