main-loader.js 365 字节
Newer Older
fxy060608's avatar
fxy060608 已提交
1 2 3 4 5 6 7
const path = require('path')

const isWin = /^win/.test(process.platform)
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)

const polyfill = normalizePath(path.resolve(__dirname, '../polyfill.css'))

fxy060608's avatar
fxy060608 已提交
8 9 10
module.exports = function(source, map) {
  return `
import 'uni-pages';
fxy060608's avatar
fxy060608 已提交
11
import '${polyfill}';
fxy060608's avatar
fxy060608 已提交
12 13 14 15
${source}
export default App;
`
}