Bootstrap 4 on Single Page Application Angular + .Net Core

前端 未结 3 1157
花落未央
花落未央 2021-02-06 18:39

Anyone tried to make an application with

dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
dotnet new angular

? like in this example ht

3条回答
  •  不知归路
    2021-02-06 19:02

    Since some js components in Bootstrap 4 depends on Tether.js add
    "bootstrap": "4.0.0-alpha.6" and "tether": "^1.4.0" to your package.json then delete node_modules folder and run nmp install then because of Bootstrap checking for tether add this to plugins in your webpack.config.vendor.js

    plugins: [
        <... your plugins here>,
        new webpack.ProvidePlugin({
            $: "jquery",
            jQuery: "jquery",
            "window.jQuery": "jquery",
            "Tether": 'tether'
        })
    ]
    

    then run

    webpack --config webpack.config.vendor.js
    webpack
    

    references are: this issue , this and this

提交回复
热议问题