Skip to content

Commit

Permalink
fix: exclude when install global
Browse files Browse the repository at this point in the history
  • Loading branch information
deot committed Jan 17, 2020
1 parent c35fd65 commit 9f0f6fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions node/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Config {
const { devServer, ...override } = webpackConfig || {};
const ENV_IS_DEV = process.env.NODE_ENV === 'development';

const exclude = new RegExp(resolve(__dirname, '../node_modules'));
const defaultOptions = {
mode: process.env.NODE_ENV,
devtool: ENV_IS_DEV ? 'cheap-module-eval-source-map' : undefined,
Expand All @@ -39,6 +40,7 @@ class Config {
// resolve
resolve: {
modules: [
...module.paths,
resolve(__dirname, '../node_modules')
],
extensions: ['.vue', '.js', '.json', '.md'],
Expand All @@ -58,14 +60,16 @@ class Config {
"resolveLoader": {
symlinks: true,
modules: [
...module.paths,
resolve(__dirname, '../node_modules')
]
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
// exclude: /node_modules/,
exclude,
use: {
loader: 'babel-loader',
options: {
Expand Down Expand Up @@ -103,8 +107,9 @@ class Config {
},
{
test: /\.vue$/,
exclude: /node_modules/,
loader: 'vue-loader',
// exclude: /node_modules/,
exclude,
loader: r('vue-loader'),
},
{
test: /\.(scss|css)$/,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wya/doc",
"version": "1.0.4",
"version": "1.0.5",
"description": "wya-doc for js",
"main": "index.js",
"files": [
Expand Down

0 comments on commit 9f0f6fa

Please sign in to comment.