Skip to content

Commit 5436ba3

Browse files
Cecil PhillipCecil Phillip
authored andcommitted
fixed imports in vue.config.js
1 parent b77d819 commit 5436ba3

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

src/demo10/client/vue.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// <reference types="node" />
2-
import ChainableWebpackConfig from "webpack-chain";
2+
const ChainableWebpackConfig = require("webpack-chain");
33

44
module.exports = {
55
outputDir: '../wwwroot',

src/demo11/client/vue.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// <reference types="node" />
2-
import ChainableWebpackConfig from "webpack-chain";
2+
const ChainableWebpackConfig = require("webpack-chain");
33

44
module.exports = {
55
outputDir: '../wwwroot',

src/demo12/client/vue.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/// <reference types="node" />
2+
const ChainableWebpackConfig = require("webpack-chain");
3+
4+
module.exports = {
5+
outputDir: '../wwwroot',
6+
// Include Vue runtime + compiler since we're using Vue directly within Razor
7+
runtimeCompiler: true,
8+
9+
/** @type {(config:ChainableWebpackConfig) => void} */
10+
chainWebpack: config => {
11+
config.entryPoints.delete('app');
12+
config.entry('main').add('./src/main.ts');
13+
config.output.when(process.env.NODE_ENV === 'production',
14+
config => config.filename('[name].build.min.js'),
15+
config => config.filename('[name].build.js')
16+
);
17+
}
18+
};

0 commit comments

Comments
 (0)