Skip to content

Commit

Permalink
chore: 🤖 upgrade sass-loader,use the sass implementation direct
Browse files Browse the repository at this point in the history
  • Loading branch information
gemxx committed Nov 14, 2022
1 parent cf71780 commit ea9777b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions packages/xgplayer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
"core-js": "^2.5.4",
"css-loader": "^0.28.11",
"json-loader": "^0.5.7",
"node-sass": "^4.8.3",
"postcss-cssnext": "^3.1.0",
"postcss-loader": "^2.1.5",
"raw-loader": "^2.0.0",
"sass-loader": "^6.0.7",
"sass": "^1.56.1",
"sass-loader": "^10.3.1",
"style-loader": "^0.20.3",
"sugarss": "^1.0.1",
"uglifyjs-webpack-plugin": "^2.2.0",
Expand Down
37 changes: 21 additions & 16 deletions packages/xgplayer/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,40 @@ const rules = [{
}
},
'postcss-loader',
'sass-loader'
{
loader: 'sass-loader',
options: {
implementation: require('sass')
}
}
]
}, {
test: /\.svg/,
loader: 'raw-loader'
}];
}]

const umdModuleConfig = {
rules
};
}

const babelModuleConfig = {
rules: rules.concat({
test:/\.(js|jsx)$/,
use:{
loader:'babel-loader',
options:{
presets:[
test: /\.(js|jsx)$/,
use: {
loader: 'babel-loader',
options: {
presets: [
'es2015'
],
plugins: [
"add-module-exports",
"babel-plugin-bulk-import"
'add-module-exports',
'babel-plugin-bulk-import'
]
}
},
exclude:/node_modules/
exclude: /node_modules/
})
};
}

const umd = {
entry: {
Expand Down Expand Up @@ -107,10 +112,10 @@ const client = {
}
}

const controls = ['airplay', 'cssFullscreen', 'danmu', 'definition', 'download', 'enter', 'error', 'errorRetry',
'flex', 'fullscreen', 'i18n', 'keyboard', 'loading', 'localPreview', 'memoryPlay', 'miniplayer', 'mobile', 'pc',
'pip', 'play', 'playbackRate', 'playNext', 'poster', 'progress', 'reload', 'replay', 'rotate', 'screenShot',
'start', 'textTrack', 'nativeTextTrack', 'time', 'volume'];
const controls = ['airplay', 'cssFullscreen', 'danmu', 'definition', 'download', 'enter', 'error', 'errorRetry',
'flex', 'fullscreen', 'i18n', 'keyboard', 'loading', 'localPreview', 'memoryPlay', 'miniplayer', 'mobile', 'pc',
'pip', 'play', 'playbackRate', 'playNext', 'poster', 'progress', 'reload', 'replay', 'rotate', 'screenShot',
'start', 'textTrack', 'nativeTextTrack', 'time', 'volume']

const umd_es6_controls = controls.map(key => {
return {
Expand Down

0 comments on commit ea9777b

Please sign in to comment.