chore: separate polyfill
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const BundleAnalyzerPlugin =
|
||||
require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
||||
.BundleAnalyzerPlugin
|
||||
|
||||
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": {
|
||||
"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",
|
||||
"dev": "webpack-dev-server --config build/webpack.dev.js --host 0.0.0.0",
|
||||
"test": "karma start",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import 'core-js/modules/es.map'
|
||||
import 'core-js/stable/promise'
|
||||
import EntryBtn from './EntryBtn/EntryBtn'
|
||||
import DevTools from './DevTools/DevTools'
|
||||
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