Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(webpack): 自定义解析文件的扩展名 #284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
lintOnSave: true,
productionSourceMap: false,
// assetsDir: 'static',
chainWebpack: (config) => {
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
.set('lin', resolve('src/lin'))
Expand All @@ -19,13 +19,9 @@ module.exports = {
.use('vue-loader')
.loader('vue-loader')
.end()
.use("vue-markdown-loader")
.loader('vue-markdown-loader/lib/markdown-compiler')
},
configureWebpack: {
resolve: {
extensions: ['.js', '.json', '.vue', '.scss', '.html'],
},
.use('vue-markdown-loader')
.loader('vue-markdown-loader/lib/markdown-compiler')
config.resolve.extensions.store = new Set(['.js', '.json', '.vue', '.scss', '.html'])
},
css: {
loaderOptions: {
Expand All @@ -36,7 +32,5 @@ module.exports = {
},
devServer: {},
// node_modules依赖项es6语法未转换问题
transpileDependencies: [
'vuex-persist',
],
transpileDependencies: ['vuex-persist'],
}