Browse Source

update webpack config

tags/v1.22.9.2^2
chenshihai 3 years ago
parent
commit
bd5d0af030
2 changed files with 14 additions and 0 deletions
  1. +7
    -0
      webpack.config.js
  2. +7
    -0
      webpack_pro.config.js

+ 7
- 0
webpack.config.js View File

@@ -29,6 +29,11 @@ for (const path of stadalonePaths) {
standalone[parse(path).name] = [path];
}

const vuePages = {};
for (const path of glob('web_src/vuepages/**/vp-*.js')) {
vuePages[parse(path).name] = [path];
}

const isProduction = process.env.NODE_ENV !== 'development';

module.exports = {
@@ -44,6 +49,7 @@ module.exports = {
icons: glob('node_modules/@primer/octicons/build/svg/**/*.svg'),
...standalone,
...themes,
...vuePages,
},
devtool: false,
output: {
@@ -267,6 +273,7 @@ module.exports = {
symlinks: false,
alias: {
vue$: 'vue/dist/vue.esm.js', // needed because vue's default export is the runtime only
'~': resolve(__dirname, 'web_src/vuepages'),
},
extensions: ['.tsx', '.ts', '.js']
},


+ 7
- 0
webpack_pro.config.js View File

@@ -29,6 +29,11 @@ for (const path of stadalonePaths) {
standalone[parse(path).name] = [path];
}

const vuePages = {};
for (const path of glob('web_src/vuepages/**/vp-*.js')) {
vuePages[parse(path).name] = [path];
}

const isProduction = process.env.NODE_ENV !== 'development';

module.exports = {
@@ -44,6 +49,7 @@ module.exports = {
icons: glob('node_modules/@primer/octicons/build/svg/**/*.svg'),
...standalone,
...themes,
...vuePages,
},
devtool: false,
output: {
@@ -267,6 +273,7 @@ module.exports = {
symlinks: false,
alias: {
vue$: 'vue/dist/vue.esm.js', // needed because vue's default export is the runtime only
'~': resolve(__dirname, 'web_src/vuepages'),
},
extensions: ['.tsx', '.ts', '.js']
},


Loading…
Cancel
Save